I have a remote bare Git repository on an Ubuntu server, where the files are owned by the user
my_project and the group
my_project, with permissions set accordingly. All commiters are themself in the group
When somebody commit then push from any Ubuntu laptop with the user
my_user to the server via SSH, some files in the remote repository are created (updated?) so they now belong to the user and group
Of course, when somebody else wants to commit, he is now unable to do so because he doesn't have write permissions. I could set permission to 777 but it's not the best option.
Is there any way I can solve this problem while keeping restricted write permissions?