16

Possible Duplicate:
How do you discard unstaged changes in git?

I know that when I git add tracking content to repository, git copy/update content of its object stores. If I change my content continuously without git add again, and I regrets all those changes and I want my last snapshot in index back to my working copy, how can I do?

Community
  • 1
  • 1
naive231
  • 1,268
  • 1
  • 10
  • 28

1 Answers1

3

You can use git-checkout for this:

git checkout -- .
ThiefMaster
  • 298,938
  • 77
  • 579
  • 623
  • 2
    Alright,I got clear concept finally. Git's checkout behavior is override my working copy with index content actuallly, not my last commit(usually HEAD). Thanks, ThiefMaster. – naive231 Nov 26 '12 at 01:04