Skip to content

Instantly share code, notes, and snippets.

@eduardobc88
Last active February 1, 2019 00:18
Show Gist options
  • Save eduardobc88/7742cfbda75b7f8b85dd5129dcc93ad3 to your computer and use it in GitHub Desktop.
Save eduardobc88/7742cfbda75b7f8b85dd5129dcc93ad3 to your computer and use it in GitHub Desktop.
Merge a repository into the other repository
cd path/to/project-b
git remote add project-a path/to/project-a
git fetch project-a
git merge --allow-unrelated-histories project-a/master --squash # or whichever branch you want to merge
git remote remove project-a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment