UPDATE: I confirmed that it was indeed file permissions that was causing this issue to occur. My host has suPHP installed for security reasons which causes a 500 error if I do not have proper permissions set (755 on folders, 644 on files).
Unfortunately, with those permissions, I am unable to push changes to the folder via git.
Trying to work with permissions so that I can still be secure while also being able to deploy with git.
======================================
Below is the original question:
======================================
I have a non-bare remote repository that I push changes to after working locally.
My local machine has Ubuntu 14 and my remote server has Cent OS. Both are using Git version 1.9.1.
I was able to push to the remote repository's Master branch due to the following:
git config receive.denyCurrentBranch ignore
The following saved in ".git/hooks/post-receive"
GIT_WORK_TREE=../ git checkout -f
And it is executable (chmod +x).
Recently, after attempting to do a "git push dev master", it appears that there are no issues because it will successfully push.
When I SSH into the remote repository and do a "git log", it shows my newest commit listed. However, when examining the files, the changes are not present.
When typing "git branch", I see that I am currently on the Master branch (typing "git checkout master" confirms that I was already on the master branch).
The only way for me to see the changes is to look in the git log for the most recent commit and then type "git checkout [commit ID] ."
Doing this makes the changes show up but my permissions change and I am forced to use a bash script to change the permissions to what is desired.
What can be done to prevent this issue from occurring?