Welcome to the practical guide for this Git workshop. During this session, we will abandon graphical interfaces (GUIs) and embrace the power of the Command-Line Interface (CLI).
- Understand what happens behind the scenes of Git.
- Master the local and remote Git workflow.
- Learn how to solve conflicts confidently from the terminal.
This tutorial is based on "Pro Git" by Scott Chacon (2nd edition, 2014).
Before we begin, open your preferred environment and log into your GitHub account.
- Local Git CLI is preferred. If not installed, follow installation steps based on your operating system.
- If not locally installed, use the Master's Data Science Hub service.
Git installation on Linux
- Open a shell terminal
- Type
git --version+ Enter. If not installed:- For Debian/Ubuntu run:
sudo apt-get install git - For RedHat distros run:
sudo dnf install git
- For Debian/Ubuntu run:
Git installation on MacOS
- Default shell is available via the
Terminalprogram within yourUtilitiesfolder. - Type
git --version. If not installed: https://git-scm.com/download/mac
Git installation on Windows
- Install gitforwindows.org's app.
Additional reference: Git installation steps on Software Carpentries Git tutorial
-
Access to the terminal:
- Go to Data Science Hub
- Log in with your GitHub credentials.
- Open a terminal: on
Files(tab) >New>Terminal
-
Git client shall be available through the terminal.
Follow the files in chronological order:
- 00 - Shell Reminder *Reminder of Shell commands targeting rapid file content editting"
- 01 - Git Basics Configuration, staging, committing, and history analysis.
- 02 - Remote Work Moving local changes to remote GitHub repositories.
- 03 - Collaborative Work Learn the Git/GitHub workflow in collaborative environments.
- Exercise Prove your Git and GitHub knowledge.
- 04 - Advanced Git Fork maintenance, Complex Git Flows.