Since git always mess the file permission settings I want add a shell script to git do the permission change after checkout. So I thought of adding following to post-checkout
#!/bin/sh
find . -type f -print0 | xargs -0 chmod 664
find . -type d -print0 | xargs -0 chmod 775
but git post-checkout is in .git/hooks/ so by using . operator will only look in that folder or does git somehow knows to get this to start search from main project directory?
One of the reason that I got little confuse is that if you do a git status on .git/hooks
you get following:
% git status
fatal: This operation must be run in a work tree