git diff commit_id 会生成最后一次提交到目前修改过的内容补丁
git diff commit_id1 commit_id2 会生成两次提交之间修改过的内容补丁
git format-patch -1 commit_id -o D:/patch 生成当前提交内容的补丁
git format-patch commit_id1...commit_id2 -o D:/patch
打补丁:
git am xxxxxx.patch
有冲突的时候:
git apply –reject xxxx.patch
git add related_files
git am –resolved
注:用git am –resovled可以继续git am的操作把commit log也自动的打上!