Create repository and upload main branch

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.

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;

The simple method is to clone this repository to your computer. Follow this;

  1. Goto C:\Dev
  2. 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

Your main branch is ready.