Last active
December 11, 2019 10:08
-
-
Save Fintan/ed11d23fb80408c03edeab17c19380a2 to your computer and use it in GitHub Desktop.
based on https://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/ but using --allow-unrelated-histories with newer git versions
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
git init | |
touch initial.txt | |
git add initial.txt | |
git commit -m 'initial commit' | |
git remote add -f shorttxt [email protected]:hmheng/cpl_short_text_table.git | |
git merge shorttxt2/master --allow-unrelated-histories | |
git mv -k * ./shorttxt/ | |
#investigate this because -k is not desirable | |
#shopt -s extglob | |
#git mv -n ./!(exclude_me|exclude_me) ./destination_folder | |
# a variation on this is documented here; https://medium.com/@filipenevola/how-to-migrate-to-mono-repository-without-losing-any-git-history-7a4d80aa7de2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment