Select your PC environment:
Let's start off by creating a new local repository. Our goal is to create a new tutorial directory and put it under the Git version control. We will be using this directory throughout this tutorial.


Create the tutorial directory anywhere on your computer. Right-click and then click "Git Create repository here" to have that directory tracked by Git.
In the following screen, click "OK" without checking "Make it Bare".
Creating repositories
Upon successfully creating a repository, click "OK" and close it in the next prompt.
Creating success screen
If everything is done correctly, the tutorial directory will now have a new icon as shown below. If the icon remains unchanged, try right-clicking on the file and choose "Update to the latest status".
Tutorial Directory icon


Create the tutorial directory anywhere on your machine. After that, run SourceTree. Click "Add Repository" located on the top left of the bookmarks list window. Alternatively you can choose File > New from the menu bar.
Start SourceTree
Click on "Create a Repository". Enter the target directory name that will be used to create a local repository. Click the "Create" button. We will bookmark the directory as "tutorial".
Create repository
The new repository should now be listed the bookmarks list.
Bookmark list

Command Line

Create the tutorial directory anywhere on your computer. Access the directory and use the "init" command to turn that directory into a local Git repository. $ git init Follow the steps below to turn the new tutorial directory into a Git repository. $ mkdir tutorial $ cd tutorial $ git init Initialized empty Git repository in /Users/yourname/Desktop/tutorial/.git/
Now that you're ready, let's commit some files to this respository.