git.rst
changeset 2179 178897af315a
parent 2176 40c43e30c7fa
child 2190 f589976b8876
equal deleted inserted replaced
2178:abbb150314d2 2179:178897af315a
   320 
   320 
   321   $ git reset --hard "HEAD@{...}"
   321   $ git reset --hard "HEAD@{...}"
   322 
   322 
   323 https://stackoverflow.com/questions/134882/undoing-a-git-rebase
   323 https://stackoverflow.com/questions/134882/undoing-a-git-rebase
   324   Undoing git rebase.
   324   Undoing git rebase.
       
   325 
       
   326 Undo reset --hard
       
   327 =================
       
   328 
       
   329 ``git reset --hard`` is destructive command without backup data.
       
   330 
       
   331 You may find your previously added data in Git garbage::
       
   332 
       
   333   $ git fsck --lost-found
       
   334 
       
   335 look to files inside ``.git/lost-found`` directory.
       
   336 
       
   337 Reviewing ``git reflog`` also may help.
       
   338 
       
   339 * https://stackoverflow.com/questions/5788037/recover-from-git-reset-hard
       
   340 * https://stackoverflow.com/questions/14251194/how-to-recover-after-i-execute-git-reset-hard-head
   325 
   341 
   326 Git bisect
   342 Git bisect
   327 ==========
   343 ==========
   328 
   344 
   329 ``bad`` changes should be later in graph history then ``good`` ones. To use
   345 ``bad`` changes should be later in graph history then ``good`` ones. To use