Skip to content

Instantly share code, notes, and snippets.

@oshow
Created February 10, 2012 09:30
Show Gist options
  • Save oshow/1788021 to your computer and use it in GitHub Desktop.
Save oshow/1788021 to your computer and use it in GitHub Desktop.
uniting two git repositories(rough sketch)
cd ~/my_repo1/
git fast-export --all --signed-tags=strip > ~/my_repository.fi
cd ~/my_repo2/
git fast-import < ~/my_repository.fi
# warning: Not updating refs/heads/master (new tip b3e90632cd34e2f4439ba0e6412c2fae3b7929e3
# does not contain b003578907cd0788e350cb3b69e573f59d6db4b8)
# .....
git checkout b3e90632
git checkout -b new_branch
git checkout master
git merge new_branch
cd ~/my_repo2/
git remote add repo1 ~/my_repo1/
git fetch repo1
git merge repo1/master
@dspinellis
Copy link

(cd ~/my_repo1/
git fast-export --all --signed-tags=strip ) |

( cd ~/my_repo2/
git fast-import )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment