I did a git commit but I have not pushed it to the repository yet. So when I do git status, I get \'# Your branch is ahead of \'master\' by 1 commi
git commit
git status
IF you have NOT pushed your changes to remote
git reset HEAD~1
Check if the working copy is clean by git status.
ELSE you have pushed your changes to remote
git revert HEAD
This command will revert/remove the last one commit/change and then you can push