Git usage (4)-git the work area principle of the Suspend zone and modify the Delete command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.