Created
March 20, 2024 17:14
-
-
Save shashank-shekhar/634114b96208778ed9a763338b0ddc83 to your computer and use it in GitHub Desktop.
copy one repo into an existing repo with history
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 repo2 | |
git checkout master | |
git remote add r1remote **url-of-repo1** | |
git fetch r1remote | |
git merge r1remote/master --allow-unrelated-histories | |
git remote rm r1remote | |
#https://stackoverflow.com/a/17373088 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment