So there is three ways to do this and I'm looking for the best fit for my current situation. Here is a good write up about the differences: https://github.com/ingydotnet/git-subrepo/blob/master/Intro.pod
I have a Unity project in which I have a number of resource files, which is maintained in a separate git repository. I want to have a "shadow copy" of the resource files, inside my Unity project. I can do that with either Submodules, Subtree or the new fancy Subrepo.
I don't want to allow changes via the parent repo, so basically I don't need the ability to commit and push from the sub-repo. I can solve that by ignoring everything below the resource folder, to avoid local changes to show up in the parent repo.
This is only for local developer purpose, so the developer experience is most important:
- I don't want it to affect the history in the parent repo (which subtree does every time you pull the subtree).
- I would prefer minimum change of dev experience, so the developer shoulden't have to think about the sub-repo (Which they have to using submodules).
- Committing/pushing the sub repo is not necessary - only fetch/pull
Changes to the resource repository should only be managed (committed/pushed) separately via the separate repository.
So basically I just want to copy/fetch the files from the resource repo into a resource folder in the Unity repo. No need to commit/push changes. Not showing changes would be preferrable.
How would you go around that?
And finally? I use Sourcetree and Gitlab - do they support git-subrepo?