Installation
To get started, the git command-line tool needs to be installed.
Atlassian has a pretty nifty tutorial for the installation, but you can also follow the documentation on Git's own website.
Download links from git-scm.com:
- Windows: https://git-scm.com/download/win
- Linux: https://git-scm.com/download/linux
- macOS: https://git-scm.com/download/mac
Testing
After installation, you will want to check that Git is properly set up.
Open your choice of terminal (Linux & Mac) or Command Prompt on Windows and type:
git --version
Example:
$ git --version
git version 2.31.0
Configuration
In git, the commits hold some metadata about you.
You will need to set a name and email to be used. This is especially important when working with others, as the information is needed to distinguish committers in the history.
git config --global user.name "First Last"
git config --global user.email "devnull@polarsquad.com"
You can check that the above worked by running git config -l
. You'll also get all the other settings it has:
$ git config -l
...
user.name=Miika Kankare
user.email=miika.kankare@polarsquad.com
Next
You're now ready to make your first commit!