2 # See https://stackoverflow.com/a/69193032/7976758
5 git config core.sharedRepository group
8 chgrp -R $1 . # Use desired group name
10 # Fix file/directory permissions throughout the entire tree
11 chmod -R ug+rwX . # Please note **uppercase** X
13 # Make FS to inherit group on creating subdirectories or files
14 find . -type d -exec chmod g+s '{}' \+
16 # Git object DB files are read-only
17 find .git/objects -type f -exec chmod ug=r '{}' \+