1. Go to git website: https://git-scm.com/downloads, to download Git.
2. Download based on your OS compatible version eg. window, Mac, Linux as shown below

Note: you can use Git bash which comes included in Git for Windows. For Mac and Linux you can use the built-in terminal
3. Open the command line like GitBash or terminal if Mac machine and check version of git by below command shown:
1 |
git --version |
4. now once we verified that git has been installed , lets setup username & email
set global username and email address:
1 2 |
$ git config --global user.name "Your Name" $ git config --global user.email "your_email@example.com" |
once done, you can also setup your text editor to use:
1 |
$ git config --global core.editor "TextEditor Name" |
5. next step is to create git folder:
1 2 |
mkdir myproject cd myproject |
- mkdir command create a new directory or folder
- cd changes the current working directory.
6. once you are inside the project directory:
Initialize Git by command:
1 |
git init |
- Great ! You just created your first Git Repository!
- GIT understand now to watch project folder.