Follow these steps;
I am assuming that project already exists and we are adding a new repository. Got to Project Settings –> Repositories–> Create new repository.
![](/wp-content/uploads/2021/09/image-5.png)
In the Create a new repository dialog, verify that Git is the repo type and enter a name for your new repo. You can also add a README and create a .gitignore for the type of code you plan to manage in the repo. A README contains information about the code in your repo. The .gitignore file tells Git which types of files to ignore, such as temporary build files from your development environment.
We will see this page;
![](/wp-content/uploads/2021/09/image-6-1024x300.png)
The simple method is to clone this repository to your computer. Follow this;
- Goto C:\Dev
- git clone <repo name>
you will get a warning that you have cloned an empty repository. That’s ok
- Goto C:\Dev\FM.LedgerServiceAPI
This is the folder that clone command has created
- Copy your code into this folder. You can use file explorer or command line like this;
copy .. \source folder\*.* .
- git add .
- git commit -m”initial code pushed”
- git push origin main
this will push your code to the main on remote server
- git log
![](/wp-content/uploads/2021/03/image-2.png)
Your main branch is ready.