Posted By

cphoover on 08/03/12


Versions (?)

Git Fixing un-committed mistakes

 / Published in: Other

  1. # MORE INFO:,_checkout_and_revert.html
  3. # If you've messed up the working tree, but haven't yet
  4. # committed your mistake, you can return the entire working
  5. # tree to the last committed state with
  7. git reset --hard HEAD
  9. #If you just want to restore just one file, say your hello.rb, use git checkout instead
  10. git checkout -- hello.rb
  11. git checkout HEAD hello.rb

Report this snippet  

You need to login to post a comment.