When several people share their work on the same git repository, it is required to handle file permissions properly.
This is an ugly solution, but it seems to work
git init --bare
echo "chmod -f -R a+rw ." >> hooks/post-receive
chmod a+x hooks/post-receive
chmod -R a+rw sharedrepo