How to generate patch file?

Source: Internet
Author: User

Diff-u-d xxx

You can add-R to compare the two directories and generate a patch, that is, diff-u-d-r <dir A> <dir B>

Note: <dir A> is the directory without code modification, and <dir B> is the directory with code modification. Otherwise, the patch will appear in the future:

Reversed (or previusly applied) patch detected! Assume-r? [N]

 

After a patch is generated, the patch is usually:

1. Unpack the source code package for the patch

2. Enter the source code directory for CD.

3. Patch-P1 <patch file path>

-P1 is the first level path of the Two diff objects in the diff command line in the patch file, which is generally the source code root directory. In this way, it is logical.

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.