Undo reset --hard.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 03 Sep 2017 00:11:27 +0300
changeset 2179 178897af315a
parent 2178 abbb150314d2
child 2180 aba1eda8608a
Undo reset --hard.
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
 ==========