git log --stat显示全部文件路径

本文介绍了Git的diffstat命令,它用于生成差异统计信息。默认情况下,当未连接到终端时,diffstat会显示最多80列。若路径名过长,会用'...'省略。可以通过设置--stat参数指定显示宽度,如`git log --stat=200`,以完整显示路径。此外,还可使用--stat-width、--stat-name-width和--stat-count进一步定制输出。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

--stat[=<width>[,<name-width>[,<count>]]]

    Generate a diffstat. By default, as much space as necessary will be used for the filename part, and the rest for the graph part. Maximum width defaults to terminal width, or 80 columns if not connected to a terminal, and can be overridden by <width>. The width of the filename part can be limited by giving another width <name-width> after a comma. The width of the graph part can be limited by using --stat-graph-width=<width> (affects all commands generating a stat graph) or by setting diff.statGraphWidth=<width> (does not affect git format-patch). By giving a third parameter <count>, you can limit the output to the first <count> lines, followed by ... if there are more.

    These parameters can also be set individually with --stat-width=<width>, --stat-name-width=<name-width> and --stat-count=<count>.

参考帮助文档,可以看到git在没有终端连接的时候会只显示80列的。
执行git log --stat时,对于一些太长的路径会出现以“…”来省略的情况。
就像这样:
在这里插入图片描述
可以手动设置显示宽度

git log --stat=200

这样的话就可以设置成显示200列了,就会显示完整的路径
就像这样
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值