I have been noticing that when I pull from my github repo on a development server(Red Hat) the ownership of the files change after the pull is completed. The .git file used to be owned by me but then I noticed that it would write files as me and I need it to write files as a different user. So i changed the ownership of the .git directory.
I stumbled on to git config core.filemode
which was true. I since have set to it false. I have not seen a difference after setting this to false. What should I do to keep my files ownership from changing.
This doesn't happen to me locally.
Git isn't a deployment server. It writes files as whoever's writing the files, that would be you. If you need permissions and ownership set, you could cook up a post-checkout hook and have it read a config file or something to decide what to do next.
If it suffices to preserve the group, you can set the setgid flag on the directories. See http://en.wikipedia.org/wiki/Setuid