Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
Are your users committing directly into the repository, or are they committing into their own clones and pushing into yours? – grawity May 7 '14 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 '14 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 '14 at 18:43
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 '14 at 19:03
@Zoredache: Correct. That is what I need! – Ari May 7 '14 at 19:59

You must log in to answer this question.

Browse other questions tagged .