Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Orlandster/38b54962ba49e769add0b6330ca1d4dc to your computer and use it in GitHub Desktop.
Save Orlandster/38b54962ba49e769add0b6330ca1d4dc to your computer and use it in GitHub Desktop.
Git: merge branch from different repositories
mkdir joinSamples
cd joinSamples
git init
git remote add sample1 git.yourserver.local/sample1.git
git remote add sample2 git.yourserver.local/sample2.git
git fetch sample1
git fetch sample2
git branch sample1_master sample1/master
git branch sample2_master sample2/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment