title: How to use group file permissions correctly on a git repository?
body: <p>We're accessing a shared git repository via file paths, for various reasons I'll omit for now, created with --shared=group.</p>
  
  <p>We have various unix groups but all share a common group. If I run a chgrp -R on the git repository everyone can read from it, but if someone writes to it more often than not new files are created which do not use the common group.</p>
  
  <p>This problem appears to be because our primary group is not the shared one and if we run a newgrp all seems to work well.</p>
  
  <p>There are issues with this approach though; newgrp is slow and it spawns a new shell, which makes me think calling it in a .bash_profile would be a bad idea, without even considering whether or not we'd want <em>all</em> our new files to use the common group. Relying on memory to run it before doing any git work seems like a recipe for disaster too though.</p>
  
  <p>So... any suggestions?</p>