0

i'm using git as a versioning system for a vr project.

I've been asked to version the main vr project and the source files of the created assets, but i've also been requested to separate the two in terms of folders.

What i tought is to have the main (git) project containing the folder of the vr project itself separated from the folder containing the source files of the asset and have some per user configuration to let 3d artist not fetching (downloading) the main vr project folder and vr artist not fetching the asset source folder.
The actual situation involve more folders but this is the principle: version everything and have anyone fetch just the folder needed.

Is there any way to do this?

i know of .gitignore files, but they are needed only to avoid to commit files/folders and not to avod fetching, right?
I found out .git/info/exclude but if i'm correct it is just a global .gitignore, with the difference that it's not versioned so it can be specific for each clone of the repo.

fudo
  • 2,254
  • 4
  • 22
  • 44

1 Answers1

1

You are correct that ignore rules .gitignore, .git/info/exclude) do not do what you want.

Generally speaking, there is no access control over "part of a commit". If you need actual control over who can fetch different parts of the project, then you need to use multiple repos. (You could tie them together using submodules or subtrees.)

If you don't need to control who sees what, but merely want to make things more convenient by giving users just what matters to them, you might look into whether sparse checkouts will suit your needs.

Mark Adelsberger
  • 42,148
  • 4
  • 35
  • 52
  • Yeah, sparse checkouts might be a better option than my idea :) – Svend Hansen Sep 12 '17 at 13:41
  • Hi guys, thanks in advance for the help, but what do you mean with "sparse checkouts"? is it a partial checkout at the begenning of the work so i have locally just the part of the project i need? if it is it, probably it's not the solution for me since tartoiseGit seems not to have the possibility to checkout just a part of the repository. – fudo Sep 13 '17 at 14:45
  • @fudo - I don't know much about the tortoiseGit shell, but the mechanism of sparse checkout is supported by git itself so I find it very doubtful that it would be unavailable to you (so long as you're on a new enough git version). More info here: https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/13738951#13738951 – Mark Adelsberger Sep 13 '17 at 16:21
  • @fudo the switch/checkout option for tortoiseGit is checkout all the files for a branch not part of files. And it's un-reachable to checkout part of files. – Marina Liu Sep 14 '17 at 09:04
  • @MarkAdelsberger the fact is that tartoiseGit interface don't expose this feature (at least i didn't find it), i'm not the only one who will use the versioning, and i'm quite sure that it is too difficult for the artists to run git from cli. – fudo Sep 14 '17 at 09:19
  • @fudo - "The fact is that [it's not there] (at least I didn't find it)". I don't deal with unnecessary hostility. Good luck. – Mark Adelsberger Sep 14 '17 at 13:26