The folder beginner contains the exercises for the C2SM Git Workshop "Git for Beginners".
The folder advanced contains the exercises for the C2SM Git Workshop "Git for Advanced".
To run this course on your computer, the following things need to be set up:
To follow the course, Git needs to run on a Linux or MacOS terminal. Windows users can either follow the instructions below to install Ubuntu or use a Linux server they have access to.
Important note: You must have at least Git 2.28 (released 27 July 2020) installed. You can check your Git version by typing
git --version
in your terminal.
Mac and Linux users: To install Git on your computer, please follow the instructions to Install Git on Mac or Install Git on Linux
Windows users: Please follow the instructions below to install Ubuntu under Windows. Afterwards, please follow the Install Git on Linux instruction.
Instructions for Windows Users
We recommend to install the Windows Subsystem for Linux 2 (WSL2). Using Git with WSL2 provides a better terminal experience for Windows users. With WSL2, you can access a Linux terminal directly from Windows, which makes it easier to work with Git commands and other Linux-based tools. This also allows for more flexibility in managing and running scripts, as well as better compatibility with Linux-based workflows. Additionally, WSL2 provides a more secure environment for Git operations by isolating them from the Windows operating system.
- Enable the Windows Subsystem for Linux (WSL) feature on your Windows machine by following the steps here.
- Install a Linux distribution of your choice from the Microsoft Store. We recommend using Ubuntu 22.04.3 LTS.
- Open the Start menu and search for "Ubuntu" to launch the distribution.
- Follow the prompts to set up a username and password for the Ubuntu distribution.
Congratulations! You have now an Ubuntu environment and can work in the same way as on a Linux machine.
Having a GitHub account allows you to collaborate on open-source projects and store your own code in the cloud. With an SSH key, you can securely connect to GitHub without having to enter your username and password every time you push or pull code, which makes the process faster and more convenient. It also adds an extra layer of security to protect your GitHub account from unauthorized access.
Only the section under the corresponding header is relevant to you in the following links.
- Create your own GitHub account (if not yet available)
- Generating a new SSH key (leave the passphrase emtpy)
- Adding a new SSH key to your account
To install Python, we recommend the instructions from Real Python, but of course many other instructions will do as well.
Check if everything is set up correctly by following the steps below from a Linux shell.
- Step 1: Download the file check_requirements.sh.
curl -O https://raw.githubusercontent.com/C2SM/git-course/main/check_requirements.sh
- Step 2: Make the file executable.
chmod +x ./check_requirements.sh
- Step 3: Run the script from a Linux shell.
./check_requirements.sh
Have fun!