Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have set up a local git repo on a linux machine and have users check in and check out from it:

/myfolder/gitrepo/

How can I disable any modification access to that folder directly unless they come from git commit requests. I would like to do so even for my own username. I don't have root/sudo access.

share|improve this question
1  
Are your users committing directly into the repository, or are they committing into their own clones and pushing into yours? –  grawity May 7 at 18:34
    
It isn't entirely clear to me what you are doing here? Is this a bare repository? You can't really push to a non-bare repo, so? –  Zoredache May 7 at 18:42
    
I don't have a remote repo. I just created a local repo and I was hoping I can use that local repo for multiple users. –  Ari May 7 at 18:43
1  
Right, so what you want to do then is create a bare repo, that you will treat as the official repo, then set permissions so people can clone/push/pull from it as fits your requirements. –  Zoredache May 7 at 19:03
    
@Zoredache: Correct. That is what I need! –  Ari May 7 at 19:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.