Article reprinted from: http://blog.csdn.net/think2me/article/details/39056379
Bo Master said without my permission, not reproduced, then do not post, copy the key parts for the memo
1. Staging area is a very important concept for git, figuring out staging area, and figuring out what a lot of git's operations are doing. 2. Git manages the modification, not the file, so commit will only submit a change of the deferred zone that has been add 3. Modify: When you mess up the contents of a file in the workspace and want to discard the workspace changes directly, use the command git checkout-file.
4. Change: When you not only changed the contents of a file in the workspace, but also added to the staging area, want to discard the changes, two steps, the first step with the command git reset HEAD file, in git checkout-file
5. Modify: If you have submitted an inappropriate modification to the repository, you want to revoke this commit, you want to use git reset-hard commit_id to version fallback
6. Git rm for you to confirm deleting a file
Blogger has an all-in-one git tutorial http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
Git usage (4)-git the work area principle of the Suspend zone and modify the Delete command