]> git.phdru.name Git - git-scripts.git/blob - sharedRepoGroup
Add a script `sharedRepoGroup`
[git-scripts.git] / sharedRepoGroup
1 #! /bin/sh
2 # See https://stackoverflow.com/a/69193032/7976758
3
4 set -e
5 git config core.sharedRepository group
6
7 # Fix group
8 chgrp -R $1 . # Use desired group name
9
10 # Fix file/directory permissions throughout the entire tree
11 chmod -R ug+rwX . # Please note **uppercase** X
12
13 # Make FS to inherit group on creating subdirectories or files
14 find . -type d -exec chmod g+s '{}' \+
15
16 # Git object DB files are read-only
17 find .git/objects -type f -exec chmod ug=r '{}' \+
18