If you found the following error on git push commit
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'git@192.168.1.X:/var/git.server/.../web'
Edit .git/config, add the following code:
[receive]
denyCurrentBranch = ignore