Installing Git and Setting Up Accounts

Git is a Version Control System (VCS) that has gained a lot of traction among the programming community. We will want to use version control to keep track of the files we write, and the changes we make to them.

Account Creation

During the course we will show you how to use GitHub to host some of your work and do code related project management. You will need to set up an account:

  • Please register for a GitHub account
  • When choosing a username we recommend not using a name that includes an employer or university in case you move later on
  • i.e. 'johnsmith' or 'johnsmith86' are OK, 'johnsmithUZH' probably not

Mac Users

Department Managed Macs

Git should already be install via "xcode". If it isn't, look for 'Software Update' in your System Settings and update "xcode". Verify your installation..

We will install Git using Homebrew. Enter the following lines of code into your terminal:

brew install git
brew link --force git

Then close and reopen the terminal. Now Verify your installation.

Linux Users

Git should be installed already for you. To check if it is, enter the following in a terminal:

git --version

If you get a bunch of numbers (ideally starting with 2.15) or higher - you are good to move on.

If not, install it by entering the following into the command line:

sudo apt-get install git

Once complete, verify your install.

Windows Users

Install git via the WindowsTerminal with the following command:

winget install -e --id Git.Git --interactive
  • Accept all defaults, apart from:
    • Default Editor: Choose Visual Studio Code in the drop down menu
  • Once installation is complete, restart WindowsTerminal and verify your install.

Verifying your install

To verify your installation, type the following command in a terminal and press the return key:

git --version

You should get an output that looks like:

git version 2.25.1

Ensure that you have a version greater than 2.15.0 installed.