Gernot Walzl


Git is a distributed version control system (VCS).
It is used for source control management (SCM).


Git is part of the official Debian repository:

apt install git


Create a project

mkdir /srv/git/${PROJECT}.git
cd /srv/git/${PROJECT}.git
git init --bare --shared

Share the project with a group

Create a group and change the group of the project directory:

addgroup ${GROUP}
chgrp -cR ${GROUP} /srv/git/${PROJECT}.git

Add users to the group:

usermod -a -G ${GROUP} ${USER}



Set your name and your email address for all projects:

git config --global "John Doe"
git config --global

Basic usage

Clone a repository via SSH:

cd src
git clone ${USER}${PROJECT}.git

Edit some files:


Review modifications in files:

git diff

Prepare a commit by adding modified files:

git add

Review the set of changes by listing changed files:

git status

Commit the changes with a short message:

git commit -m "Improve description about the project"

Push the commits to the remote server:

git push

Workflows and Branching Strategies

Especially, when working in a team of developers,
you will make your thoughts on how to efficiently work together.

Many workflows and branching strategies already exist.
Here are a few popular workflows:

Git flow
GitHub flow
GitLab flow

External Links

CONTENT.html source 2022-06-05 3 KB