Last active
August 30, 2022 03:02
-
-
Save Arondight/d70912ce3c108e0fd6ff063d794a85ea to your computer and use it in GitHub Desktop.
git merge repos with 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
#!/usr/bin/env cat | |
cd ./repo_a/ | |
git remote add repo_b ../repo_b/ | |
git fetch repo_b | |
git merge --allow-unrelated-histories repo_b/master | |
# handling merge conflicts | |
git merge --continue | |
# merge done, also you can merge more repos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment