Hands-On Git Workshop
Welcome to the hands on demonstration of Git!
Generally, you can say that Git has two purposes: (1) record and manage changes while you are working on your files and (2) facilitate working together on a project. While the first is a 'local' workflow and the second 'distributed', Git smoothly bridges the two by its flexible design.
Git has several mechanisms to help you record file changes, navigating through those changes, and compare different versions of each file. You can even work on different ideas for your codebase, and try them out by switching between the different working states. All this local recording of files and navigating through those changes is what we call version control.
In addition, Git enables you to 'back-up' your files to some other place. You do this by pushing to a remote, usually a server like GitHub or GitLab.
The combined ability to compare files and push changes to a server already points in the direction of working together on a codebase. In that sense, Git offers a way of collaborating through a distributed workflow.
Getting Started
This repository provides demo material for the slides under
bit.ly/git-workshop-intro. For the
Part 1
of the demo, run the following commands to get some local sample files (we
pretend not to know the clone
command
yet):
git clone https://gitlab.ep1.rub.de/workshops/git --branch part1
bash git/initialize.sh
cd local_version_control
The following commands for Part 2, should only be run after you have completed the first part:
git checkout part2
bash initialize.sh
cd ../git_remotes