views:

49

answers:

1

I'd like to keep Git repositories on four machines synchronized, and all of them are private repos. Is it possible to set up a single Git repository to pull from the other three machines at the same time, with all the changes attempting to merge with a single branch locally?

+3  A: 
git remote update

will pull from all of your remotes. The merge won't be automatic. You could try

git merge -s octopus r1/master r2/master r3/master r4/master

to get a five-way octopus merge, but it doesn't seem like that's what you'd really want (I certainly wouldn't want that).

Dustin
All remotes unless `remotes.default` is not defined, in which case `git remote update` would fetch from all remotes in group specified by 'remotes.default'. If 'remotes.default' is not defined, it would nevertheless skip remotes for which `remote.<name>.skipDefaultUpdate` config variable is true. See http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
Jakub Narębski