Git: Setup a New Repository

Use Git to Setup a New Repository

In this article I’ll demostrate how to use the Git bash command-line to setup a new repo.

First, I’ll start with a new empty folder in which I plan to store a development solution.

Next, I’ll create a new folder for my repo and switch my current working folder to that folder.

Now I’m ready to initialize the new folder as a git folder, create a new master (main) branch, and start in that branch.

Note: the “.git” folder is not visible within WinX, to protect the git Db, which tracks changes.

Now I’ll list everything in the folder.