The Issue: when multiple users have access to the same working directory, permissions issues can occur in the meta-data if any git
operations are p
There are a number of ways to address this problem. Personally, I'd recommend the following in your existing repository:
# Create a group named "gitshare" that will share the repository.
sudo groupadd gitshare
# Add yourself and as many others as you want to the group.
sudo adduser "$LOGNAME" gitshare
# Everything else needs to run from the top level of your Git repository.
cd /path/to/repository
# Add group permissions for *new* modifications to repository.
git init --shared=group
# Fix permissions for existing repository objects.
chown -R :gitshare "$PWD"
chmod -R g+swX "$PWD"
Obviously, you need to make sure that the users have directory traversal permissions all the way to your repository (e.g. user-private directories may cause problems), and that all team members who need access belong to the repository's shared group. After this initial setup, though, it should "just work."