Undo and redo
Ctrl+Z undoes commits, merges, rebases, resets, checkouts, deleted branches, tags and stashes, and discarded files, hunks and lines, and Ctrl+Shift+Z redoes. Before a discard, the app saves a copy of what would be lost.
To avoid breaking anything, it won't undo over files edited after the operation, or while a merge or rebase is stopped midway.
git refloggit reset --hard HEAD@{3}
Ctrl+Z