Created
April 7, 2018 05:27
-
-
Save awwong1/32a6abb8293b32b799b8bcdbd120aaa1 to your computer and use it in GitHub Desktop.
force add separate repo as subfolder in current repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd path/to/project-b | |
git remote add project-a path/to/project-a | |
git fetch project-a | |
git merge -s ours --allow-unrelated-histories project-a/master | |
git read-tree --prefix=project-a/ -u project-a/master | |
git commit -m "Merge project-a" | |
git remote remove project-a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment