While I don't currently have time to provide a super detailed answer, I can outline a possible strategy for running executables from a pre-built
git package under your home directory. This response is aimed at Debian, since that's what you said you're using, but the basic concept is applicable to other OSes and distros as well.
First, go to http://packages.debian.org/squeeze/git and review the dependencies of the
git package. Luckily, you'll find that
git doesn't have that many. Most of the important ones are probably already installed, maybe with the exception of
Next, download the binary .deb package and extract its contents (search the web to find out how to extract a .deb package manually). You'll find a
data.tar.gz file. Extract that, and you'll get
usr/lib/git-core/* files. You can put these files somewhere under your home directory. Now the critical part:
/usr/bin/git calls out to numerous "helper" programs under
/usr/lib/git-core, and this latter path is hardcoded into
/usr/bin/git. Luckily, you can override the hardcoded value by setting the
GIT_EXEC_PATH environment variable, so update your dotfiles to point to where you decided to keep the various
Finally, it's possible that not all of the library dependencies (and their dependencies, etc, etc) were installed on your system (e.g.,
libexpat1). You can download the binary packages for these as well, and extract them under your home directory, and then help
git find them by setting your
LD_LIBRARY_PATH environment variable appropriately.
P.S. I've probably had more than my fair share of being in your position, so what I've outlined above is more than theoretical. But working around this sort of problem is a little bit of a black art, so there will usually be some additional fussing around involved. Good luck.