git - changed file summary like svn diff --summarize/svn status from console (no gitk)
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.)
精彩评论