Pushing without committing
git
Solution
You need to push an older commit to achieve this. For example, you could push the commit right before the current HEAD using this comment:
git push --force origin HEAD^:master
After this you can push the HEAD commit again:
git push origin master
However, instead of pushing all the time consider calling the hook manually. That's usually easier - but don't forget to test with an actual push when you think everything works just to be sure.
Problem
I have a git repo and I just pushed it to a server. Then I setup a post-receive hook on the server. I want to check it works. I have to commit again just to see if it works? I would really like to just force a push while I'm trying to get this set up rather than keep making commits that have no real value. Its not working, and I just don't get it. ``` $ git push --force origin master Everything up-to-date ```