Lately I’ve been toying around with git as a mean to independently develop on my workstation and when I’m gone on my laptop. Although it does in fact require some brainpower to wrap your mind around it (as Linus admitted himself) it looks really promising. So far I have only worked out the basic features (not quite as much as I know about subversion). One thing I can say already though is that it really is fast.

When using it on Mac OS X (which has really been pissing me off in the past few weeks ;) you probably installed it using fink. Fink installs binaries into /sw/bin and /sw/sbin. Now, when you do an “git pull ssh://your-mac-os-machine/path” it tells you that it couldn’t find git-upload-pack, because the PATH variable only contains /usr/local/bin etc. What you have to do is:

  • Edit /etc/sshd_config and set “PermitUserEnvironment yes”
  • Create ~/.ssh/environment which should contain: “PATH=/sw/bin:/sw/sbin:<your -other-paths>”
  • Restart sshd (you can do it by disabling/enabling “Remote Login” in the System-Preferences

All those steps have to be taken on your Mac OS X machine with the user you intend to do the git-push’s to. After that it should work fine.