git format-patch
git format-patch HEAD^ # 生成最近的1次commit的patch
git format-patch HEAD^^ # 生成最近的2次commit的patch
git format-patch <r1>..<r2> # 生成版本 r1-r2 之间的patch
git format-patch <r1> # 生成版本 r1 以来的patch(不包含r1)
git format-patch -1 commit-id # 选定的那个commit打patch
git am
git apply --stat 0001-limit-log-function.patch # 查看patch的情况
git apply --check 0001-limit-log-function.patch # 检查patch是否能够打上,如果没有输出,则无冲突,可以打上
git am 0001-limit-log-function.patch # 将名字为0001-limit-log-function.patch的patch打上
git am --abort # 废弃 patch
git am --resolved # 解决完冲突,接着去打 patch