title: Git set create mode to 100664 when pushing new folder/files to shared repo
body: <p>Me and my colleagues have a shared Website repo.  We are all on Windows 7 64 bit pushing to Ubuntu 10.04. Below is our setup in case this is in question.</p>
  
  <p>local->hub->website</p>
  
  <p>We push to the hub, which is a bare repo, then with a post-update hook in the hub cds to the website repo and pulls the changes from the hub to the website.  This is done because the website is live and always checked out and can't be pushed to.</p>
  
  <p>When I'm on my local and I commit a new folder/file it states the below with the create mode of 100644</p>
  
  <pre><code>$ git commit -a -m "testing permissions"
  [master 865b809] testing permissions
   1 files changed, 1 insertions(+), 0 deletions(-)
   create mode 100644 test.php
  </code></pre>
  
  <p>When I push these changes to the repo it creates the folders as 755 and files as 644 when I need them to be 775 and 664.  As long as I'm only editing files the permissions at least stay the same. The only problem is on creation.</p>
  
  <p>On the shared repo we have <code>core.sharedrepository = 0660</code> which I thought meant it would set permissions as I needed.  Also our <code>umask</code> in our <code>.bashrc</code> is set to 002.</p>
  
  <p>Here is my local config</p>
  
  <pre><code>[core]
  repositoryformatversion = 0
  filemode = false
  bare = false
  logallrefupdates = true
  symlinks = false
  ignorecase = true
  hideDotFiles = dotGitOnly
  </code></pre>
  
  <p>It seems as though our local is determining the permissions and ignoring what is setup on our shared repo.  How can I get the create mode to be 100664.</p>
  
  <h2>EDIT</h2>
  
  <p>Hub config</p>
  
  <pre><code>[core]
  repositoryformatversion = 0
  filemode = true
  bare = true
  sharedrepository = 0660
  [receive]
  denyNonFastforwards = true
  </code></pre>
  
  <p>Website config</p>
  
  <pre><code>[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
  sharedrepository = 1
  [receive]
  denyNonFastforwards = true
  </code></pre>
  
  <h2>EDIT2</h2>
  
  <p>As Kalle Pokki below pointed out in her comments.  This issue is that when using GIT and pushing it is running non-interactively so my umask setup doesn't work.  I've updated my post-update for my repo to set the umask to <code>0002</code> everytime anyone pushes.</p>