Answer the question
In order to leave comments, you need to log in
How to make GIT stop overwriting group owner?
The bottom line is this - when I do a git pull, I overwrite the group for a file,
for example, I have a file before git pull
-rw-r----- 1 user groupname footer.tpl
after git pull
-rw-r---- - 1 user user footer.tpl
how do I avoid overwriting the group?
Answer the question
In order to leave comments, you need to log in
Run git as a user whose primary group is groupname.
Well, either manually then perform chmod.
There is no other way - when creating a file (and git creates files), it is created on behalf of the ID and GID of the current user / process.
Read help on umask and execute umask <mask>.
After already your git commands.
Put on setgid bit
https://www.gnu.org/software/coreutils/manual/html...
On most systems, if a directory's set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question