On Tuesday, February 4, 2014 2:47:02 AM UTC+1, George Chester wrote: > > Currently we use SVN and VisualSVN allows you to specify users with access > for each folder! This come in particularly handy because we have certain > people work on only specific plugins which are located in your own folders! > > By not allowing the entire group to have access to 100% of the code, we > protect the code from being copied! How can we do this in Git? > > I've read about SubModule but I'm not real clear if that is for 3rd party > libraries and such only! > >
In principle, Git has no access control built into it. Hence, we build access control into the access point, often meaning permissions on the repositories as they exist on the file-system. It follows, that we can only do access control on the repository level. Some tools do offer permissions on the branch level (Gerrit being one example, I believe), but this is often not the right answer if you have "secrets" in your code. You're already on the right track by looking at submodules. They are Git's native way of compositioning multiple repositories into super-repositories, while they still remain normal repositories (with respective access control). They can be for internal code or 3rd party libraries, it doesn't matter. In the end they're just folders in a project. I'm not sure what the right setup and workflow for having submodules with varying access control would be, but I do know that people have problems getting started with and understanding submodules. So what I would do in your case would be to just start splitting your code into the "public" repo, and the "private" repo with its special permissions, and have people check them out and sync them manually. When the time comes where you start getting problems with these two repositories, and you are more experienced with Git, have another look at submodules, and see whether they will help. It's very hard to say which Git hosting tool you should start with, as that depends on things like your proficiency with SSH, are you a Windows shop, etc. Just ask if you need more advice on this. One of the most simple and powerful (SSH-based) tools is Gitolite: http://gitolite.com/gitolite/ -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
