美文网首页
Patch Submission

Patch Submission

作者: lucientlau | 来源:发表于2018-01-18 11:23 被阅读0次

    Generate Patch

    diff -u version1 version2 > change.patch
    

    Apply patch

    patch -p1 version1 < change.patch
    

    will change version1 to be the same with version2

    if run once more

    patch -p1 version1<change.patch
    Reversed (or previously applied) patch detected! Assume -R? [n] y
    

    will reverse version1 to the original version1

    patch -p1 version2<change.patch
    Reversed (or previously applied) patch detected! Assume -R? [n] y
    

    will change version2 to be the same with version1

    if run once more

    patch -p1 version2<change.patch
    

    will reverse version2 to the original version2

    if your need patch fold

    like linux kernel patch

    diff -Nur fold1 fold2 > change.path
    

    相关文章

      网友评论

          本文标题:Patch Submission

          本文链接:https://www.haomeiwen.com/subject/nlwioxtx.html