Before you start to get your hands dirty with Git, you would need to install it on your local machine.

install-git

Download and Install Git

  1. Go to Git Downloads
  2. Download the latest version of Git for Windows or Git for Mac
  3. Install Git on your choice of operating system.
  4. Choose the default options during installation. You can customize all options at later point of time.

Run Git and Configure Common Options

Once Git is installed. You can right click anywhere on your machine and you will find these two options in the menu.

git-bash-gui

We do not recommend using Git GUI if you are serious about learning programming/Git. Git Bash is far more powerful and is the choice of power users.

When you click Git Bash Here, this is how the Git bash window would look like.

git-bash-terminal

As a first time Git user, we suggest you to configure these options. Replace the text in red with your own values.

# Set up Git with your name 
git config --global user.name "<Replace-Your-Full-Name>" 

# Set up Git with your email 
git config --global user.email "<Replace-your-email-address>"

Also, ensure to setup your choice of editor with Git. Here are the commands for the three most popular editors.

Atom Editor

git config --global core.editor "atom --wait"

Sublime Text Editor

git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe' -n -w"

Visual Studio Code Editor

git config --global core.editor "code --wait"