Created
February 21, 2015 11:25
-
-
Save iluwatar/63e676f80e3e9cec0350 to your computer and use it in GitHub Desktop.
git_merge_branches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <work dir>/<dst repository> | |
git remote add -f <src repository1> <work dir>/<src repository1> | |
git fetch -n <src repository1> | |
git checkout <branch> | |
git branch --set-upstream <branch> <src repository1>/<branch> | |
git merge --no-edit <src repository1>/<branch> | |
git remote rm <src repository1> | |
git remote add -f <src repository2> <work dir>/<src repository2> | |
git fetch -n <src repository2> | |
git branch --set-upstream <branch> <src repository2>/<branch> | |
git merge --no-edit <src repository2>/<branch> | |
git remote rm <src repository2> | |
# ... repeat for src repositories 3-5, and finally ... | |
git push -u origin <branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment