Git中的一笔commit提交,可以成为patch
- 生成Patch
- 带有commit信息:
git format-patch -1 HEAD - only代码
- 带有commit信息:
- 应用Patch
- check是否有冲突
git apply --check 0001-xxx.patch - 应用Patch
git apply 0001-xxxx.patchgit am 0001-xxxx.patch
- check是否有冲突
Git中的一笔commit提交,可以成为patch
git format-patch -1 HEADgit apply --check 0001-xxx.patchgit apply 0001-xxxx.patchgit am 0001-xxxx.patch