git diff 一般用法
git diff commit id1 commit id2 > xxxx.diff
git apply xxxx.diff
取单个文件的
git diff commit1 commit2 file > xxx.diff
获取文件列表,加- -stat参数。或者- -name-status
git diff commit id1 commit id2 --stat
git diff commit id1 commit id2 --name-status
–stat和> kernel.diff不能连用。–stat会失效。
参考:
https://segmentfault.com/q/1010000000133613