git is a distributed revision control system with an emphasis on being fast. It was initially designed and developed by Linus Torvalds for Linux kernel development. The purpose of this lab is to get hands on experience with git to learn how it works and how to use it.

Much of the material here has come from Pro Git. We'll be using github to practice gitting.

stage and commit helloWorld.c. You may have to merge. Keep everyone else's name in the file.

Push it to the repository.

Once everyone has done this we should have a file with everyone's name in it.

Merge Tools

There are a few cool tools to help with merging, notably a graphical diff tool. Many such tools are available and will easily hook up to Git such as kdiff3, meld, vimdiff, etc. (more are listed in ProGit section 1.5). For this example, we're going to use meld.

You can set up your diff tool by navigating to your .git repository and running:
host$ git config --global diff.tool meld

You can also get rid of the annoying confirmation message by running:
host$ git config diftool.prompt false

You can then diff a file in meld using (and background it so you can keep using your shell):
host$ git difftool [filename] &

Moving from svn

Here's a nice article on a common git workflow for those who are moving from svn.