Here is the problem: I have a lot of code, including artwork for the GUI I need to version in order to faithfully recreate a software product. I am also working on both Windows and Mac. The actual code I'm working on that will change on a daily basis is really small. However, all the related resources total to about a few GB before its built.
From my research online, it seems like either git-subtree or git-submodule is what I would need to use to keep my git repository fast.
I'm sure a lot of you git users out there faced a similar problem and have been confronted with the same decision.
Which approach have you used and what problems have you faced down the line?
If you own an external repository to which you will likely push code, use Git submodule because it is easier to push. Use Git subtree if there is a third-party code that you are doubtful to push to because it is easier to pull.
Git submodules may look powerful or cool upfront, but for all the reasons above it is a bad idea to share code using submodules, especially when the code changes frequently. It will be much worse when you have more and more developers working on the same repos.
Git submodules allow you to keep a git repository as a subdirectory of another git repository. Git submodules are simply a reference to another repository at a particular snapshot in time. Git submodules enable a Git repository to incorporate and track version history of external code.
Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project but still keep your commits to that project separate.
A single monolithic git repository will work just fine. Large resources that don't change will only be copied once when you clone.
If you happen to have any large resources that change over time, you might find git-media useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With