I'm going to be a bit bold, but at the moment there is no regular way to 
achieve this. Git was developed for the open source community, so "Open" is at 
the core of the design. Git doesn't do access control. I've not used Gitolite 
which apparently does provide some repo level control.

There is work on-going in conjunction with the Microsoft Visual Studio team and 
the Windows big repo team to allow a networked scheme where the repo is on 
network and only those files required are downloaded (on-demand) to the user's 
machine.

There is some other work on lazy object loading as well.

Personally I'd also like a "narrow clone" capability to complement the 'shallow 
clone' such that some form of 'ignore spec' is used to limit what is in the 
pack files that are downloaded to the user to contain just those directories 
and files that are permitted (i.e. not excluded). In that case the local user 
would still be able to create commits, with updated trees and blobs, but 
without needing the content of the unchanged, un-released trees and blobs. It 
would have the same issues as "submodules" in having the possibility of having 
'gaps' in the (worktrees of the) history tree.

So unfortunately the current answer is 'no'.


The alternative is to have a set of hooks e.g. pre-commit, or pre-recieve, so 
that the user and the server can check if the rules have been followed, and 
reject commits that do not follow the rules. This does however mean that all 
the coders do see all the code, which may be a 'security' issue.

philip
  ----- Original Message ----- 
  From: kane...@gmail.com 
  To: Git for human beings 
  Sent: Tuesday, August 29, 2017 5:31 PM
  Subject: [git-users] Is it possbile to achive GIT Workflow with advanced 
access controll


  Hello.

  I am in progress of searching efficient way to use GIT work-flow with 
advanced access permissions. The work flow is this: 
http://nvie.com/posts/a-successful-git-branching-model/ but simpler alternative 
can be taken in order to understand the actual requirement which is described 
in the next paragraph.

  What seems I need is to configure each developer with file/directory 
permissions (may not include "list" permission but only read and write if no 
"read" permission means that the DEV will not see the file/directory at all). 
That way I will be able to share enough but limited part of software with a 
developer. The second important thing is that he should still be able to send 
pull requests for merge but only with the source addition and/or modification 
in the allowed directories/files.

  To aggregate the question: is there any way to use given GIT Workflow with 
the ability to share partially the repository and still use the full potential 
of GIT repository. Git modules and subtree is not efficient and seems for 
another use-cases because they will sacrifice the repository power.


  -- 
  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/d/optout.

-- 
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/d/optout.

Reply via email to