Distributed Version Control
To seriously get into git, I recommend working through the "git book".
Using a Debian-based Linux distribution, type
sudo apt install git git-gui git-cola
to install git and two different GUI front-ends. If you're on Windows, download
git from git-scm.com (a portable edition is available).
git config --global user.name "Your Name"
git config --global user.email "firstname.lastname@example.org"
git config --global core.editor $YOUR_FAVORITE_EDITOR
git config --global -e # show/ edit config file if desired
|create an empty Git repository or reinitialize an existing one
|Show the working tree status
|Add file contents to the index
|Record changes to the repository
|Update remote refs along with associated objects
|Show changes between commits, commit and working tree, etc
|Show commit logs
|Fetch from and integrate with another repository or a local branch
|Clone a repository into a new directory
Git Cheat Sheet
A great overview of the structure of git workflows and their associated commands is available as cheat sheet.
To understand and practice branching with git, https://learngitbranching.js.org/ offers an interactive tutorial.
Generate and Upload SSH-key
ssh-keygen -t ed25519 # omitting the type would generate an RSA key
When being prompted for the filename, leave the default value. Navigate to
~/.ssh/ (on Linux) resp.
/cygdrive/c/Users/[USERNAME]/.ssh (on Windows). Print the key to standard output via
Copy the key and paste it in your GitHub (Settings → SSH and GPG keys → New SSH key) or GitLab (Preferences → SSH Keys) profile.
Git Hosting Platforms
Which branching models is to be preferred depends on the needs of an organization or of a development team. I generally recommend to keep things simple. Here are some of the most prevalent models: