Last active
February 15, 2017 22:33
-
-
Save hakjoon/46d8b4a7c3c67e5ff611fc85172b793f to your computer and use it in GitHub Desktop.
Merge repos maintaining 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
# You will lose any untracked files so a new checkout is probably wise | |
git checkout --orphan <branch_name> | |
git rm -rf . | |
git pull <other repo> | |
# clean up file structure. For example remove packaging metadata files | |
git merge master | |
git checkout master | |
git merge <branch_name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment