Git学习记录(二):代码patch

Git中的一笔commit提交,可以成为patch

  • 生成Patch
    • 带有commit信息: git format-patch -1 HEAD
    • only代码
  • 应用Patch
    • check是否有冲突
      git apply --check 0001-xxx.patch
    • 应用Patch
      • git apply 0001-xxxx.patch
      • git am 0001-xxxx.patch
posted @ 2025-10-08 21:33  梦一场6688  阅读(3)  评论(0)    收藏  举报