git outta here…

I’m switching my Source Control Management  software to git. Performance has been great, I’m learning to branch and merge with wild abandon and philosophically it’s right on (what with the distributed model and all).

Creating a new remote repository on my private server was *almost* too easy. The one snafu was getting sshd to include the git binary path for non-interactive login. To save me the trouble of having to look this up again later, add a .bashrc file to your user dir:

export PATH=/usr/local/git/bin:$PATH

Other steps, again for reference.

  • Download the git installer
  • Create a new bare repo on the remote machine:
mkdir -p /path/to/remote/repo.git
cd /path/to/remote/repo.git
git --bare init
exit
  • Add the remote repository to the local machine:
git remote add origin ssh://server/path/to/remote/repo.git
git push origin master
  • Done!

(Unless, of course you get the following message try the .bashrc workaround above)

bash: git-receive-pack: command not found

Posted

in

by

Comments

Leave a Reply