Which file permissions are impacted by Git's core.sharedrepository setting?

There is a config setting in git that is named core.sharedrepository and which to my understanding impacts the way that git deals with file permissions.

My question is what files are meant?

  • How to fix permission denied for .git/ directory when performing git push?
  • Automatically apply “git update-index --chmod+x” to executable files
  • Automatically apply “git update-index --chmod+x” to executable files
  • Git archive broken after moving from ext3 to FAT and back to ext3
  • How to force git to use specific permission settings when pushing via ssh
  • How to read the mode field of git-ls-tree's output
  • Assuming my git repo is at /home/user/project

    • the files in the /home/user/project/.git subfolder?
    • the code files /home/user/project/ but not .git?
    • all files /home/user/project ?

    the background to my question is that the files in /home/user/project/.git are created world readable -rwxrwxr--. I would like to have all files only accessible to either the specific user or at least a groupid member

  • Is it possible to have SVN vendor branch in a git repository?
  • How to deploy and sync a prototype Clojurescript app with Git?
  • How can a commit in git submodule trigger a build in continuous integration?
  • Make linear master branch git
  • What is the purpose of git stash create and git stash store?
  • Git Bash Closes Immediately on Windows 10 PC
  • One Solution collect form web for “Which file permissions are impacted by Git's core.sharedrepository setting?”

    The setting affects both the files under .git (the repository itself) and the working copy. Having read or write permission to one but not the other would not be very useful, as most git operations require access to both.

    If you have world-readable files in .git, check your umask. Does it allow this? You can test this by creating a file with touch and check its permissions.

    Git Baby is a git and github fan, let's start git clone.