Search code examples
gitgit-remote

different command to create a remote repo in Git


What are differences between these commands in Git (VCS tool) :

$ git init --bare
$ git init --bare --shared
$ git init --bare --shared=group

Would you please explain to me?


Solution

  • From the man page:

       --shared[=(false|true|umask|group|all|world|everybody|0xxx)]
           Specify that the git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When
           specified, the config variable "core.sharedRepository" is set so that files and directories under $GIT_DIR are created with the requested permissions. When
           not specified, git will use permissions reported by umask(2).
    

    What exactly are you puzzled about?