I would like to clone a git project (from github, say) and have a top level directory writable by the group.
I tried a couple of different things. First, just install umask before cloning.
$ umask 0002
The files I create are then written by the group
$ touch test $ ls -l test -rw-rw-r-- 1 user group 0 2012-05-17 09:32 test
Now i will try git clone
$ git clone git@github.com:user/repo.git Cloning into repo... [succeeds]
But the clone directory is not writable by the group.
$ ls -ld repo drwxr-xr-x 11 user group 4096 2012-05-17 09:32 repo
I tried the same with a repo created using git init --shared=umask (which should already have been by default) in a directory with 775 permissions. After clicking on github git clone , the same results are obtained.
This is not a huge deal, I can chmod in my validation scripts. But if there is a proper / built-in way to do this, this is preferable. git - version 1.7.4.1 on Ubuntu 11.04.
Any ideas or links are appreciated. I saw this post, but it uses chmod , I have not yet been able to find something else. Thanks!
git linux permissions
r_2
source share