Skip to content

Instantly share code, notes, and snippets.

@Arondight
Last active August 30, 2022 03:02
Show Gist options
  • Save Arondight/d70912ce3c108e0fd6ff063d794a85ea to your computer and use it in GitHub Desktop.
Save Arondight/d70912ce3c108e0fd6ff063d794a85ea to your computer and use it in GitHub Desktop.
git merge repos with history
#!/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