Last Updated: February 25, 2016
·
608
· henderjon

Sharing non-bare git repos

(assuming non-windows environment) chrgp -R of the .git directory to a group that contains all the users you want to have push/pull access. Then chmod +s the .git directory. This sets the special bit, and as I understand it, it asks the system to access the file/dir as the actual user, even though you're not. It's a POTENTIAL security hole, so you probably shouldn't use it outside your firewall but for sharing code internally on a non bare repo (possibly serving a site out of the working tree) this works great by allowing multiple users to push to that staging test environment on a local web server.