Back to the Club's homepage

Git for solo projects too


Git is well-known as the tool for collaborating in free software projects, and the Linux kernel in particular. What seems to be less known, is how useful it is even in a single developer scenario.

This is a slideless, demostration-based talk, walking through the practical work with Git as a most valuable tool for keeping a solo project under control, and helping in real-life situations. A simple programming project will be started and manipulated, showing useful techniques.

The basic use of git will be demonstrated and explained in the talk's first half, showing how to create a git repository, making commits, fixing the last commit, and how git is useful to keep the project clean and tidy.

In the second half, some deeper understanding about how git works will be gained. Based upon this, sophisticated manipulations will be explained, including how to modify or eliminate changes made in the past, and alter the commit history to make a clueless debugging session look as if you had it all figured out from the start.

If time allows, the talk will close with showing how git can be used to efficiently back up the project.

Above all, it will be shown how to avoid losing a good snapshot of the project, no matter what you failed to do with git.

No previous knowledge in Git (or whatsoever) is assumed, but Git-savvy participants are also welcomed to share their experience.

Summary of shown commands

As promised, this is a collection of git commands, more or less as shown:
git init
git add hello.c
git commit -a
git commit -a --amend

git checkout HEAD~1
git checkout -f
git diff master
git diff HEAD HEAD~1
git rebase -i HEAD~3
Partial checkout and backup wasn't covered in the end. The relevant commands are:
git checkout -p master

git bundle create mybundle.git --all

git clone mybundle.git myclone
cd myclone/
for i in `git bundle list-heads mybundle.git` ; do git checkout ${i##*/} ; done

Back to the Club's homepage