Skip to content

Instantly share code, notes, and snippets.

@RolandWarburton
Created November 22, 2019 01:51
Show Gist options
  • Save RolandWarburton/5c7fb516f62624759f74958b16329d09 to your computer and use it in GitHub Desktop.
Save RolandWarburton/5c7fb516f62624759f74958b16329d09 to your computer and use it in GitHub Desktop.
Merge 2 repos together and preserve that sweet sweet commit history
# Beware this will not create a subfolder for RepoB in RepoA
If you want to merge project-b into project-a:
cd path/to/project-a
git remote add project-a path/to/project-b
git fetch project-b --tags
git merge --allow-unrelated-histories project-b/master
git remote remove project-b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment