Git

LEARN TO CODE

Installing Git

Git can be installed for Windows, Linux and Mac from the Git website via their downloads page.

Git Services

Before you get started, you'll need an account on one of these services, or have a server running the Git protocol.
Note: Other services are available

GitHub

GitLab

Bitbucket

First-time Git Setup

Once you have succesfully installed Git, you'll need to enter some configuration commands.


User Credentials

You'll need your name or username and your e-mail address associated with the Git account you registered for.
You can do this from your terminal or (Git) command line, like so:

			
				git config --global user.name="Firstname Lastname"
				git config --global user.email="e-mail address"
			
	

Signing Commits

Optionally, you can also enable commit signing (which we require for our community projects). Signing allows you to provide proof that it was you that commited a certain bundle of code, so that for example if someone were to get into your Git account and upload malicious code, it would be obvious that you were not necessarily responsible and the necessary roll-backs can be made.

To do this, you'll first need to install the relevant signing tools. GPG (GNU Privacy Guard) or PGP (Pretty Good Privacy) are encryption programs that allow us to do such authentications. Downloads for Linux, Mac and Windows are available here, however it is likely that something similar is already installed on Unix-like systems.

		
					git config --global user.signingkey="GPG key ID"