Jérôme Jérôme - 16 days ago 5
Git Question

Does 'core.sharedrepository' affect working directory?

I cloned a git repository. I would like to ensure that whatever my

umask
, the files in my clone are group writable.

I set
core.sharedrepository
to
group
then
chmod
ded files as needed.

However, when doing a
git checkout whatever
, file permissions are set according to my
umask
and group write is denied.

Is this the expected behavior? Does 'core.sharedrepository' only affect files in
/.git
and not in the working directory?

(I realize that even if it worked as I expected, it wouldn't act on new files created by the user, only on files modified through git actions, so maybe the idea is silly in the first place, but I would like this option clarified for the sake of understanding.)

Answer

As you've seen, the core.sharedRepository setting (or core.sharedrepository, case is ignored for these) affects only the repository itself. It's meant for setups where several users push to a shared repository using their own identities (e.g., by direct access or via ssh-ing as themselves to the server).

Comments