Compare the usage differences between git RM and RM

Source: Internet
Author: User

Here's a look at the difference between git rm and RM, though it's a little superficial, but it's still necessary for a friend who's just been in touch with git soon.


Use git rm to delete the file, and also record the deletion;
Using RM to delete a file is simply deleting the physical file and not removing it from the git record.

Intuitively,git rm deleted files, and when executing git commit-m "abc" commits, it automatically submits the action to delete the file.


In the case of a file deleted directly from the RM command, simply executing git commit-m "abc" commits, the deletion of the file will not be submitted, you need to execute a commit, add a-a parameter,
After the rm is deleted, it is necessary to use git commit-am "abc" submission to submit the file deletion action.

Compare the usage differences between git RM and RM

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.