git – pull/push from multiple remote locations – Stack Overflow

git – pull/push from multiple remote locations – Stack Overflow

You can configure multiple remote repos with the git remote command:git remote add alt alt-machine:/path/to/repoIn order to fetch from all the configured remotes and update tracking branches, but not merge into HEAD, do:git remote updateIf it’s not currently connected to one of the remotes, it will time out or throw an error, and go on to the next. You’ll have to manually merge from the fetched repos, or cherry-pick, depending on how you want to organize collecting changes.To fetch the master branch from alt and pull it into your current head, do:git pull alt masterSo in fact git pull is almost shorthand for git pull origin HEAD (actually it looks in the config file to determine this, but you get the idea).For pushing updates, you have to do that to each repo manually. Push was, I think, designed with the central-repository workflow in mind.shareimprove this answer

via git – pull/push from multiple remote locations – Stack Overflow.