git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Whether Git supports directory level access or not?

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jul 7, 2015, 07:20 UTC
Message-ID
<CA+P7+xpqk2m2Mxv_12Mg+03GzqVa5kzVk29HAOMiW9EGpmrWww@mail.gmail.com>
In-Reply-To
<705bdbdc6a8195d59203bcb1f3027714@stockal.com>
Hi
On Mon, Jul 6, 2015 at 11:40 PM,  <saurabh@stockal.com> wrote:
Show 24 quoted lines
> Hi,
>
> Please let me know whether Git supports directory level access or not.
>
> For example :- Consider the structure with one repository consisting of sub
> directories for each product.
> main_repo:
>    dir1 dir
>    dir2 dir
>    shared-dir dir
>    private dir
> One group(user) of developers has access to dir1 and shared-dir while the
> other group(user) has access to dir2 and shared-resources.
> Just for context, both dir1 and dir2 require shared-dir to be checked out
> for building the products.
>
> And private dir is only accessible by admin(repo owner).
>
> Regards
> Saurabh gaur
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

I do not believe this is possible with git. How would this even make sense? You can do something with sub-repositories on the server end, where each directory is its own repository with different access rights (and servers like gerrit or other git server setups have various controls which enable more complex access control beyond just Unix paths)

However, in-repo per-directory permissions make no sense, as there would be no way to generate commits.

Regards, Jake

Previous: Torsten BögershausenNext: Junio C Hamano
Message 3 of 5 in “Whether Git supports directory level access or not?”
  1. saurabh@stockal.comJul 7, 2015
  2. Torsten BögershausenJul 7, 2015
  3. Jacob KellerJul 7, 2015
  4. Junio C HamanoJul 7, 2015
  5. Jacob KellerJul 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.