Quick install git 1.5.5+ on a fresh Ubuntu 7.10

This entry is note to me so that I can come back to it later on when needed.

1. Download git from: http://git.or.cz/
2. Uncompress it and go to the uncompressed git directory.
3. run: sudo apt-get build-dep git-core
4. run: sudo apt-get install libssl-dev
5. run: make configure
6. run: ./configure --prefix=/usr/local
7. run: make all doc
8. run: sudo make install install-doc
done!!

GIT (useful commands)

At Therap, our codebase is fairly large. As we were using TLA (Gnu Arch) for our SCM (Source Code Management), it was on the verge of chocking, and was getting extremely slow to do a update / commit, specially at the time of release. We were testing out several options, and after trying out some we chose to stick with GIT. The thing that I love about GIT is it’s distributed nature, and it’s ’social’ way of doing SCM. I helps more liquid communication between team members and promote better traceability and manageability. Other than this, GIT also changes the way we develop, as it promotes quick branches. This helps developers to take more hands on approach to try out new things, and if it didn’t work, they can just trash their branch and carry on their development from where they took off.

I’m listing some commands here which I found quite useful during my day to day working with git:

(Assuming that you are running git-deamon to share your project)

Clone your project from someone:
git clone git://hostname/project project

Clone a bare repository for publishing:
git clone --bare git://hostname/project project

If your origin has a release branch, add it to your local repo to track it:
git branch --track release origin/release

Add other’s repo as remote branch
git remote add -t master -t release otherperson git://otherperson/project

Fetch/merge master from otherperson
git checkout master
git fetch git://otherperson master:master
git merge otherperson/master

See which files you are changing
git log --stat

See change details too
git log -p --stat

Cherry pick a commit from one branch to another
git-cherry-pick commit-sha-key