Skip to content

Instantly share code, notes, and snippets.

View tqchen's full-sized avatar
🎯
Focusing

Tianqi Chen tqchen

🎯
Focusing
View GitHub Profile
@tqchen
tqchen / howto-put-git-repo-into-another-repo.md
Created July 6, 2018 19:56 — forked from Restuta/howto-put-git-repo-into-another-repo.md
How to make git repo to be another's repo subfolder preserving history

Hacky way (let me know if you know better one)

Let's say you have repo Main and repo Proto, you want to put your Proto under Main, so folder structure will be the following:

|-SRC
   |---proto

and you also want to preserve commit history, so everybody can see what you were doing while developing proto, sounds like pretty easy task. The easiest way is to create folder structure similar to Main repo SRC\proto and start working using is as a root, but if you like me, you didn't think about this beforehand, so you path would be harder: