In order to use Git, you need to make sure it's available on your platform. Follow the instructions below to make sure you're set up.
Luckily, Git comes with Mac by default, but you might need to enable it.
-
Open your terminal. If you've never done this before you can find it in Applications > Utilities > Terminal.
-
Type
git --version
and press enter. -
If you see something like
git version 2.14.3 (Apple Git-98)
then you're already set up! -
If you see a popup like the following, then click Install and follow the instructions.
-
Once installed, go back to step 1 and check you're set up.
The easiest way to use Git on Windows is using.... Git for windows.
- Go to gitforwindows.org
- Click Download
- Click on Git-2.17.0-64-bit.exe if you're using a 64-bit version of Windows (most modern versions of Windows are 64-bit). Otherwise click Git-2.17.0-32-bit.exe. If you are unsure, there's a handy guide here.
- When you've successfully started the installer, you should see the Git Setup wizard screen.
- Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users, so don't worry if you're not sure.
To use it, simply open Git BASH. A simple way to do this is to right click the folder you want to work within in Windows Explorer and select Git BASH.
Simply install Git with the package manager which comes with your Linux distribution (Ubuntu, Fedora etc).
- Open Terminal
- Type
sudo apt-get update
and press enter. You'll be asked for your password. Note that it won't look like you're typing. - Type
sudo apt-get install git
- Open Terminal
- Type
sudo yum install git
and press enter. You'll be asked for your password. Note that it won't look like you're typing
To start using Git to version control your files, you'll need to provide your name and email address.
We'll cover this in the workshop, but if you're feeling studious and want to be ahead of the game, then open Terminal (Mac) or Git BASH (Windows):
- Type
git config --global user.name "Your name"
to set your name. - Type
git config --global user.email "your@email.com"
to set your email.
If you're having trouble, there's a useful guide available at www.atlassian.com/git/tutorials/install-git which covers installing git in some depth. If you're still having trouble, then bring your questions to a Codebar session or the workshop and we'll help you out.