How to create new repo on existing code and link to remote

I wrote some code in some files in a folder called AA. I have a repo in remote in Bitbucket. Here're the steps to link my local to remote using TortoiseGit:

  1. Create a repo for the folder AA: Navigate to the folder in windows explorer and right click, in the popup menu, click Git Create repository here...
  2. Create a .gitignore file
  3. Commit the changes
  4. Set the remote: in windows explorer, right click, in the popup menu, point to TortoiseGit and click on Settings, select Git/Remote in the left panel and set the URL:

Image

Now we can pull/rebase from remote, merge to local, and push to remote.

kiatng