1. 生成patch: git diff > diff.patch 在当前的工作目录下生成diff.patch文件。 2. 合入patch: git apply diff.patch 合入当前目录下的diff.patch文件。