We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Restore uncommitted changes after hard reset
git fsck --cache --unreachable $(git for-each-ref --format="%(objectname)") | cut -d ' ' -f3 | xargs git show > uncommitted
Restore a commit after hard reset. It's only valid to restore just previous action
git reset --hard $(git reflog | cut -d ' ' -f1 | sed ‘2!d’)