Setting up Git

If you don’t already have a GitHub account, go to https://github.com/arrow-up-right and sign up (this is completely free unless you want to use a paid version of GitHub). Once you have a GitHub account, open a command shell and enter:

$ git --version

If you already have Git installed then a version number should appear. If your computer doesn’t recognize this command then consult thisarrow-up-right guide on installing Git for your machine.

Once Git is installed, you can alter its settings by changing configuration variables with the ā€œgit configā€ command (see thisarrow-up-right article). If this is your first time using Git on the command line, you will need to set the ā€œuser.nameā€ and ā€œuser.emailā€ configuration variables to your GitHub username and email so that Git command line is linked to your account. You can do this by entering the following commands:

$ git config --global user.name = "your username"
$ git config --global user.email = [your github email account]

The global flag makes these the default values for anything you do on the machine (see thisarrow-up-right article). These are the only configuration variables that you are required to alter to use Git. For more information on configuring Git see thisarrow-up-right Git documentation.

Last updated

Was this helpful?