How do I force git to run a post-receive hook on a server even if I don\'t have a new commit to push?
I use git to aut
I like Jamie Carl's suggestion but it doesn't work, and I got the error:
remote: error: By default, deleting the current branch is denied, because the next error: 'git clone' won't result in any file checked out, causing confusion.
In my case I'm testing post-receive hooks on my localhost against a bare repository. Warning/super important, run this command only on the remote server location!
git update-ref -d refs/heads/develop
It'll delete the reference for the develop branch (you may also need to delete any of the files you deployed for that branch too), then you can go ahead and do the git push deploy_localtest develop or whatever push command you want for that branch.