bkerby

Untitled

May 2nd, 2012
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. $> git log -1
  2. commit de1cea402d6f2856edc3f4df31382a7c42d4be62
  3. Author: just me <[email protected]>
  4. Date: Wed May 2 22:00:50 2012 +0400
  5.  
  6. EEEEE 9
  7.  
  8. [ ~/tmp/repo ]
  9. $> git reset --hard HEAD~1
  10. HEAD is now at f4fe738 EEEEE 8
  11.  
  12. [ ~/tmp/repo ]
  13. $> git co de1cea402d6f2856edc3f4df31382a7c42d4be62
  14. Note: checking out 'de1cea402d6f2856edc3f4df31382a7c42d4be62'.
  15.  
  16. You are in 'detached HEAD' state. You can look around, make experimental
  17. changes and commit them, and you can discard any commits you make in this
  18. state without impacting any branches by performing another checkout.
  19.  
  20. If you want to create a new branch to retain commits you create, you may
  21. do so (now or later) by using -b with the checkout command again. Example:
  22.  
  23. git checkout -b new_branch_name
  24.  
  25. HEAD is now at de1cea4... EEEEE 9
  26.  
  27. [ ~/tmp/repo ]
  28. $> git log -1
  29. commit de1cea402d6f2856edc3f4df31382a7c42d4be62
  30. Author: just me <[email protected]>
  31. Date: Wed May 2 22:00:50 2012 +0400
  32.  
  33. EEEEE 9
Advertisement
Add Comment
Please, Sign In to add comment