当git diff不输出东西时 试试: git diff --cached 或者 git diff --staged 参考:https://segmentfault.com/a/1190000011969554