After editing my old question a few times, I make a new one because it is a new question now.
In .git/hooks/post-update I have:
echo "a" >> /home/pi/log git update-server-info git stash git merge testing >> /home/pi/log To make an automated checkout. So I run on the client:
git push testing HEAD:testing Now my /home/pi/log contains:
a Updating ae2f44b..04753a9 Fast-forward application/views/main/index.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) But the file did not change!
$ git merge testing Already up-to-date. If I remove the script, make the push and run git stash, git merge testing it works.
Update
For testing I changed a number in a file from 17 to 20. I can see the right file version if I run
git show application/views/main/index.php but
vim application/views/main/index.php Still contains the old number. But git claims the file is updated:
$ git merge testing Already up-to-date.