File ownership/group is changed when users push to a GIT repository File ownership/group is changed when users push to a GIT repository git git

File ownership/group is changed when users push to a GIT repository


It looks like you changed the core.sharedRepository after initializing the repository rather than using init --shared=group which should set the permissions up correctly. This means that the sgid bit won't be set on the git repository's directories correctly. You will have to fix this manually with something like (assuming GNU find and xargs):

find . -print0 | xargs -0 chgrp group_namefind . -type d -print0 | xargs -0 chmod g+s