git push fails: `refusing to update checked out branch: refs/heads/master`
Pushing is meant for bare repos. For non-bare repos you should pull into them.
If you want to force this through anyway, you can do as the error message states and set receive.denyCurrentBranch to ignore. SSH to the location of the repo you are pushing to and run:
git config receive.denyCurrentBranch ignore
The master branch at remote site is checked out. If you have access to remote repository, checkout any other branch and then push from your repository.