tags:

views:

73

answers:

3

I keep all of my dotfiles in a git repository. This works out fine for me, but the problem is that I use a couple servers at work that don't have Git on them, and which I'm not really allowed to put Git on. Basically, I'm wondering what the best way to implement a fallback plan for syncing my dotfiles would be for situations where git isn't found. These machines have all of the other standard UNIX stuff on 'em -- rsync, wget, curl, perl, etc. And I seem to remember reading somewhere that git was compatible with rsync...

A: 

You can use rsync:// URLs in git fetch/git push, but it's worth mentioning that if the transfer mechanism doesn't use git on the remote side (i.e. a "dumb protocol" in git terminology), it will be much slower and much less efficient. In particular, if the remote server has no git binaries available at all, no delta compression will be used, which means that the repository will have full copies of all versions of all files.

If you decide to use a dumb protocol, you'll probably have to copy over a skeleton empty (bare) repository to the remote side before you can actually push things to it. You might also have to find some way to get the output of git update-server-info into the remote repository occasionally, so that dumb protocols can see which branches exist in the repository.

Jan Krüger
A: 

If you only intend to sync one way you could set up hooks that rsync your dotfiles on every commit which might be a 'good enough' fallback.

tosh
A: 

You could use sshfs to mount your server home on your local machine. You'll run git locally, but the files are on the server.

Tobu