Due to some bad cherry-picking, my local Git repository is currently five commits ahead of the origin, and not in a good state. I want to get rid of all these commits and st
Use any number of times, to revert back to the last commit without deleting any files that you have recently created.
git reset --soft HEAD~1
Then use
git reset HEAD
to unstage, or untrack.