Hacker News new | ask | show | jobs
by bryanlarsen 2395 days ago
Git subrepo can import a subdirectory. To oversimplify, it's a wrapper for git subtree that keeps metadata information in both your filesystem and your history so that things stay sane.

https://github.com/ingydotnet/git-subrepo

1 comments

Does subrepo break when you rebase both a commit and its parent? I recall doing something like that in the past, and subrepo stopped working.
Version 0.4.0 of subrepo has been rock solid for us and has handled everything that's been thrown at it; prior versions wouldn't handle odd situations well. Whether our "odd situations" line up with yours is a different question...

Edit: to be clear; even before 0.4.0 git subrepo handled strange situations better than git subtree did mostly because git subtree requires so much more manual work that's easy to get wrong.