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
I have experienced the same situation I did the below as this much easier.
By passing commit-Id you can reach to the particular commit you want to go:
git reset --hard {commit-id}
As you want to remove your last commit so you need to pass the commit-Id where you need to move your pointer:
git reset --hard db0c078d5286b837532ff5e276dcf91885df2296