# HG changeset patch # User Oleksandr Gavenko # Date 1504386687 -10800 # Node ID 178897af315aec1f245acc88104551beb6bf9d73 # Parent abbb150314d2249115948b81be41ed9555ee6081 Undo reset --hard. diff -r abbb150314d2 -r 178897af315a git.rst --- a/git.rst Sun Aug 27 21:49:32 2017 +0300 +++ b/git.rst Sun Sep 03 00:11:27 2017 +0300 @@ -323,6 +323,22 @@ https://stackoverflow.com/questions/134882/undoing-a-git-rebase Undoing git rebase. +Undo reset --hard +================= + +``git reset --hard`` is destructive command without backup data. + +You may find your previously added data in Git garbage:: + + $ git fsck --lost-found + +look to files inside ``.git/lost-found`` directory. + +Reviewing ``git reflog`` also may help. + +* https://stackoverflow.com/questions/5788037/recover-from-git-reset-hard +* https://stackoverflow.com/questions/14251194/how-to-recover-after-i-execute-git-reset-hard-head + Git bisect ==========