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
I believe that one of those will fit your need
1 - Undo commit and keep all files staged: git reset --soft HEAD~;
git reset --soft HEAD~;
2 - Undo commit and unstage all files: git reset HEAD~;
git reset HEAD~;
3 - Undo the commit and completely remove all changes: git reset --hard HEAD~;
git reset --hard HEAD~;
here is were I found the answer