官方解释:
The first rule takes precedence in the case of a single . To apply the second rule, i.e., format everything since the beginning of history up until , use the --root option: git format-patch --root . If you want to format only itself, you can do this with git format-patch -1 commit .git
git format经常使用命令:
git format-patch -3 //从当前分支最新提交点往下共生成3个补丁
git format-patch -1 指定commit号 //生成指定commit号的补丁
eg:git format-patch -1 5f123e379cc97c317d6094bcfa2281e1189d61f3
生成5f123e379cc97c317d6094bcfa2281e1189d61f3号的补丁,该commit号不必定在该分支开头,能够在该分支的任意位置。
=========================app