As I wanted to make a new kover release I thought I could try to move my code to git. The first step was to copy the code from cvs to a local git repository:

  • git-cvsimport -i -v -d :pserver:adrian@cvs:/cvs/kover -C kover.git kover

I was a bit surprised that the newly created directory kover.git was empty except for a .git directory. Without much knowing what I was doing I typed git-checkout and it listed all available files but my directory was still empty. So I tried git-checkout .. This time there was no output but all my files were now in my directory so that I could start doing changes.
Committing, adding and removing files is easy and works just like expected (git-commit, git-add, git-rm). The steps to publish the git repository, however, were not as easy. The following commands were necessary to make it work for me:

  • git clone –bare . git

  • touch git/git-daemon-export-ok

  • cd git/

  • git –bare update-server-info

  • chmod a+x hooks/post-update

or with newer versions of git the following mv instead of the chmod

  • mv hooks/post-update.sample hooks/post-update

  • cd ..

  • rsync -avP -e “ssh” git/

From this point on it was now possible to access the repository through http with git clone To push my changes to the repository on the server I use git-push master. It was necessary to install git-core on the server so that git-pushwould work without errors. To pull changes from the online repository I use git-pull master.

There is probably no real reason to use git because up until now kover was mainly developed by me and it will therefore not profit from the distributed features which are the main advantages from git but I wanted to play with the same toys as all the cool kids ;-).