开发者

git - changed file summary like svn diff --summarize/svn status from console (no gitk)

开发者 https://www.devze.com 2022-12-08 23:46 出处:网络
svn diff --summarize shows the changes at the file level for a commit. Output it something like: Mmodified-foo.bar

svn diff --summarize shows the changes at the file level for a commit. Output it something like:

 M   modified-foo.bar
 D   deleted-file.bar
 A   new-file.bar

Similar to svn status, but for commits. I would be happy with output similar to g开发者_如何学运维it status, but for a particular commit instead of the working copy. I know I could fire up gitk to see such a summary, but I want it in a shell.


git diff <commit> --name-status


Try this:

git show <commit> --name-status

I think show is probably what you want rather than diff. show shows the changes of that commit. diff shows all the changes between the specified commit and the current working tree, unless you specifically give it a commit range.

Sometimes I like to see some graphical metrics of changes:

git show <commit> --stat

(Although that doesn't clearly indicate file additions and deletions distinctly from modifications.)

0

精彩评论

暂无评论...
验证码 换一张
取 消