Git is a distributed source code management tool similar to darcs and mercurial. After becoming frustrated with darcs (a great interface, but it would get stuck in certain situations), I decided to give git a try. Here's what I did to set it up:
getting and compiling
curl http://kernel.org/pub/software/scm/git/git-1.5.0.5.tar.gz -O
gunzip git-1.5.0.5.tar.gz ; tar -xvf git-1.5.0.5.tar; cd git-1.5.0.5
make configure
./configure --prefix=/usr/local
make all
sudo make install
setting up the environment
Next add /usr/local/bin to your path if needed. For example, my ~/.profile file contains:
export PATH=$PATH:/usr/local/bin:/opt/local/bin:/opt/bin:~/bin
Now you can configure git to know about you:
git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com
creating a repo
Within your project folder, you can create a .gitignore file to tell git which files it should ignore. You can see mine here. Now you can create the repo:
git init
git add .
git commit
running a server
I couldn't get git to run with http, but I was able to run the server version with this command:
git-daemon --verbose --export-all
--base-path=/Volumes/Internal500GB/WebServer/iolanguage/scm/git
To get it to launch automatically at boot time, I used Lingon to create this launch file in /Library/LauncDaemons/git.plist so now the repo can be fetched elsewhere by:
git clone git://www.iolanguage.com/Io