Similar to roshnet's answer, I was able to do this with the GUI app "Git Extensions", by
- right-clicking on the commit I wanted to reset/rebase back to,
- choosing option "Rebase current branch on >" with sub-option "selected commit interactively..."
(click to see image, as my rep is to low to embed them)
right-click menu for undoing a commit with an interactive rebase
This opens up an editor window for the rebasing git command, which lets you choose how handle removing the commits above the rebase commit, and also has an glossary explaining what each command does.
(click to see image, as my rep is to low to embed them)
Initial editor window
For me, I wanted to undo a commit which added several new files, which I already had backups of in a external folder. So I changed 'pick' to 'drop', like so:
(click to see image, as my rep is to low to embed them)
3. pop-up editor window
- Then I clicked the 'save' button and closed the editor window, and click 'OK' on the command pop-up window, and it was complete.
My un-pushed commits are now gone and my local repo is now reset back to the same commit Head as the Origin repo. My staging and working directory were also emptied. But thankfully I had backed up my new files and could re-commit them to a separate branch that I do have push permissions on.
Further documentation on rebasing with Git Extensions (a free git gui app) can be found here: Git Extensions - How To: Squash and Rebase your changes