Jérôme Jérôme - 1 year ago 64
Git Question

Does 'core.sharedrepository' affect working directory?

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

, the files in my clone are group writable.

I set
ded files as needed.

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

Is this the expected behavior? Does 'core.sharedrepository' only affect files in
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 Source

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).