Created
September 7, 2014 16:22
-
-
Save alexgorbatchev/5d50a1fad1b6acb924c6 to your computer and use it in GitHub Desktop.
Merge one git repo into another preserving history
This file contains 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
#!/bin/bash | |
other_project=$1 | |
git remote add -f $other_project ../$other_project | |
git merge -s ours --no-commit $other_project/master | |
git read-tree --prefix=$other_project -u $other_project/master | |
git commit -m "Merged $other_project" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment