zoukankan      html  css  js  c++  java
  • git patch

    [root@localhost libxml2]# patch -pn < 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    patch: **** strip count n is not a number
    [root@localhost libxml2]# git apply --stat 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
     parser.c |    4 ++++
     1 file changed, 4 insertions(+)
    [root@localhost libxml2]# it apply --check   0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    -bash: it: command not found
    [root@localhost libxml2]# git apply --check   0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    error: patch failed: parser.c:4955
    error: parser.c: patch does not apply
    [root@localhost libxml2]# git am --signoff < 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    Applying: fix parser termination from "Double hyphen within comment" error.
    error: patch failed: parser.c:4955
    error: parser.c: patch does not apply
    Patch failed at 0001 fix parser termination from "Double hyphen within comment" error.
    The copy of the patch that failed is found in:
       /data1/cloud_images/libxml2/.git/rebase-apply/patch
    When you have resolved this problem, run "git am --resolved".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".
    [root@localhost libxml2]# 
    打入 patch / diff:
    git apply xxx.patch
    git apply xxx.diff
    检查 patch / diff:
    git apply --check xxx.patch
    git apply --check xxx.diff
    若git和需要打patch的文件不在一个目录:(git在framework下,patch要打入frameworks/base/下)
    git apply --check --directory=base/ xxx.patch
    git apply --directory=base/ xxx.patch
    ** git am 后面会说到,以及生产patch和打入patch的一些命令参数**
    1. 检查patch是否可用,没显示文字,就说明可用,且无冲突;
      git apply --check ~/patch/patch/0001-add-11111.patch


     
    链接:https://www.jianshu.com/p/e5d801b936b6
     
  • 相关阅读:
    IBM MQ 学习
    spring中配置监听队列的MQ
    数据库优化(二)
    设计模式
    VBA学习笔记(2)--新建word文档并插入文字
    VBA代码分行
    excel保存时出现“请注意,您的文档的部分内容可能包含了文档检查器无法删除的个人信息”
    Excel VBA 操作 Word(入门篇)
    win10无法使用内置管理员账户打开应用
    五笔字根拆分规则_字根拆分方法
  • 原文地址:https://www.cnblogs.com/dream397/p/13927737.html
Copyright © 2011-2022 走看看