[英]How do I see the list of changed files for a single commit, in Git?
When I say git status I get a list of changed files. 当我说git status时,我会得到一个已更改文件的列表。 I'd like to get a list of changed files for a commit.
我想获取一个提交的已更改文件列表。 Is there a way to use git show or some other command to do that?
有没有办法使用git show或其他命令来做到这一点? Thanks.
谢谢。
Yes, simply pass the --stat
flag: 是的,只需传递
--stat
标志:
git show --stat 1268afe676e
For commits, git show
takes the same formatting arguments as git diff-tree
, so see the latter's documentation for other formatting options. 对于提交,
git show
采用与git diff-tree
相同的格式化参数,因此请参阅后者的文档以获取其他格式选项。
是的,使用git log --stat
或git log --stat COMMIT
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.