Git diff总结? [英] Git diff in summary?
本文介绍了Git diff总结?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用 git pull
,它会显示如下的diff摘要:
更新6a78751..811f788
快进
app / Http / Controllers / SaleController.php | 7 + -
... / views / pages / sale / create.blade.php | 137 +++++++++++++ ---
resources / views / pages / sale / index.blade.php | 4 + -
resources / views / pages / sale / show.blade.php | 5 + -
4个文件已更改,123个插入(+),30个删除( - )
有没有办法像 git diff
这样的命令获得类似的输出? > git log --stat
会显示每个文件被更改的金额。
<$ c $
git diff --stat< sha1>> ; < sha2>
给出了文件和两次提交之间的更改数量。
With git pull
, it shows a diff summary like this:
Updating 6a78751..811f788
Fast-forward
app/Http/Controllers/SaleController.php | 7 +-
.../views/pages/sale/create.blade.php | 137 +++++++++++++---
resources/views/pages/sale/index.blade.php | 4 +-
resources/views/pages/sale/show.blade.php | 5 +-
4 files changed, 123 insertions(+), 30 deletions(-)
Is there a way to use commands like git diff
to get similar output?
解决方案
git log --stat
will show the amount each file was changed.
git whatchanged
gives some detail into the files that were modified.
git diff --stat <sha1> <sha2>
gives the files and the amount of changes between two commits.
这篇关于Git diff总结?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文