Peter Reavy
Peter Reavy

Reputation: 165

Using git in Windows, does the --shared option to git-init do anything useful?

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?

Upvotes: 8

Views: 958

Answers (1)

Roland Smith
Roland Smith

Reputation: 43533

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.

Upvotes: 1

Related Questions