Stages a staged file in git?
问题 I'm using git to manage my project. And I'm confused with the workflow of git when staging a file. If I staged files and forgot commit and then I modify that files and stages again and commit, how can I roll back to first staged ? 回答1: As described in "Git Internals - Git Objects", each time you change the content of a file, and add it to the cache, you do a: git hash-object -w test.txt That stores it to the object stored. I just did two git add consecutively for one file, followed by a: C: