Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

windows

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?

like image 530
Peter Reavy Avatar asked Apr 01 '14 15:04

Peter Reavy


1 Answers

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.

like image 179
Roland Smith Avatar answered Sep 27 '22 18:09

Roland Smith