git, in and of itself, cannot limit access to _anything_. It is not an access control system.
In order to limit access to one or more directories (folders) or files, you must use the facilities with the host operating system. Because you said "folder" instead of "directory", I assume that you are running Windows. I don't _do_ Windows <grin/>. On a real OS, like UNIX or Linux, you can use Access Control Lists (ACLs) to enforce limits on a user's abilities. I would hope that Windows has something similar. But how you do this when "the git way" is for every user to have their own complete copy of the entire repository exist on their personal computer, is really beyond me. Normally there is a bare repository on a "server". The developer does a "git clone" on it. This downloads everything in the repository and creates the working directory. The files and folders all belong to that user. The "server" is no longer in the picture at all. The developer can do what [s]he wants. They may, or may not, be able to do a "git push" to merge their changes back to the bare repository from which they did the "git clone". But, if they can, that operation is an "all or nothing". There is nothing within git, as distributed, to say that developer "x" can do a push, but only for files in directory "y". You might be able to do something like this by using a "Server Side Hook" as in: http://git-scm.com/book/en/Customizing-Git-Git-Hooks If the above is what you want, then you might want to look at installing gitolite on your server. It won't address the fact that a developer will get the entire repository contents. But it can control what they can successfully "push" to the bare repository. https://github.com/sitaramc/gitolite Centralized SCM systems, such as Subversion, can control who can "check out" what. But git does not take this approach. On Fri, Jul 19, 2013 at 6:37 AM, Juan Carlos RodrÃguez <juanca...@gmail.com>wrote: > Hi, **** > > ** **I have one question about Git. > > **** > > ** **I want to use Git in a project but only some developers can Access > in some folders (not all folders of the Project). Can Git limits the access > to folders to users? How? > > **** > > ** **An example: > > ** **Project p_example > > /scripts**** > > /src**** > > /docs**** > > ** **Users: A, B and C > > ** ** > > Only B and C can access into scripts, src and docs folders but A only can > access into scripts folder.**** > > ** ** > > Thanks,**** > > -- > 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 git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! <>< John McKown -- 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 git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.