jlconlin
jlconlin

Reputation: 15084

Permissions of .git for repository with multiple users

I have a git repository on a network directory. I need to set the permissions on the .git directory such that everyone on my team (they are all part of the same UNIX group) can modify the repository, e.g., push, pull, commit, etc.

I'm reluctant to do something like

chmod -R g+rwX .git

because I'm not sure if that will mess up the permissions and make it so that the repository will become corrupted.

What should the permissions be in the .git directory? How can I keep them that way?

Upvotes: 1

Views: 770

Answers (1)

torek
torek

Reputation: 490038

Yes, you want g+rwX. You also want to set core.sharedRepository = group.

Upvotes: 2

Related Questions