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.

This is the workshop version of the exercise. It assumes git is already installed and the repository is already cloned.

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

If you aren't lucky, git won't be able to merge and it will tell you so. Edit the file as above and look for <<<<<< , this will mark the places git didn't know how to handle. Fix them and remove the lines with <<<<<< and repeat the steps above.

If you are lucky, no one else has changed the file while you were working on it. If not, repeat the above steps.

Wait a while and do a git pull to see if anyone else has changed the repository.

Moving from svn

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

Other Errors while using git

If you run into a "fatal HTTP request failed" error you might have to generate a key using ssh-keygen and add it to your SSH keys on your github. To install ssh-keygen do the following:

beagle$ opkg install openssh-keygen

Once it is installed or if it is already installed:

beagle$ ssh-keygen

It will ask for a file, passphrase, and same passphrase. I just pressed enter and left them blank for all three. This should show up: