Skip to content

Instantly share code, notes, and snippets.

@ntcho
Created October 9, 2017 15:48
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 ntcho/4705e3bc33b6aa0bf73d3f2bd6440748 to your computer and use it in GitHub Desktop.
Save ntcho/4705e3bc33b6aa0bf73d3f2bd6440748 to your computer and use it in GitHub Desktop.
Merging git repositories

// at the copying repo // move the files into another folder to prevent merge conflicts git add . git commit -m "Project move in progress"

// on the destionation repo // the name temp could be changed for anything else // locations are like in the shell, but the \ should be replaced to / git remote add temp location git fetch temp // merge the changes git merge --allow-unrelated-histories temp/master // remove the added remote temp git remote remove temp

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