8

I noticed that when using the Git Extensions on Windows to init a bare repository that it does

git init --bare --shared=all

I've read the manual for the --shared options. It seems a convenience to set folder permissions but the descriptions are very UNIX-y (e.g. umask).

My remote repositories are going to be shared, but they're on a remote UNC share under Windows Authentication.

So, in my situation, is there any need for this --shared option, for instance if I was initialising a repo from the command prompt?

Peter Reavy
  • 165
  • 5

1 Answers1

1

Except from the permissions (that indeed might not work in windows), using the --shared flag also sets the receive.denyNonFastForwards config in shared repositories. Of course you could also set that manually if you want to...

Try running git init --bare --shared=all from a git-bash shell, and see if you get any reports regarding permissions.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94
  • 1
    Running that from `git-bash`, I got no reports regarding permissions. Checking the config file, you are correct about `receive.denyNonFastForwards`. The property `core.sharedrepository` is also set. Apart from that I will assume there is no real point to this switch on Windows and mark yours as the correct answer. – Peter Reavy Apr 02 '14 at 12:49
  • @PeterReavy Just out of curiosity, (because I haven't tried it on windows) have you noticed and changes in the direcory's permissions after creating the shared repo? – Roland Smith Apr 02 '14 at 20:43
  • 1
    I made one repo of each on my local file system and ran `cacls` against both and diffed the output. It made no difference to the permissions at all. – Peter Reavy Apr 03 '14 at 15:05