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.patch
git am 0001-xxxx.patch
- check是否有冲突
Git中的一笔commit提交,可以成为patch
git format-patch -1 HEAD
git apply --check 0001-xxx.patch
git apply 0001-xxxx.patch
git am 0001-xxxx.patch