Created
September 9, 2022 12:25
-
-
Save patrickwolf/cc7461e2e2de4722c5351feb0d41b5d4 to your computer and use it in GitHub Desktop.
How to merge Git repos with common code BUT NO common ancestry
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
git init | |
git remote add new https://github.com/patrickwolf/sandbox_repoNew | |
git remote add old https://github.com/patrickwolf/sandbox_repoRoot | |
git fetch new | |
git fetch old | |
echo "first" > readme.md | |
git add readme.md | |
git commit -m "first" | |
git branch combined | |
git rebase --rebase-merges --onto 9086ffd 80ece84 combined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment