1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Show The diffstat Summary Of A Commit as a git til

This commit is contained in:
jbranchaud
2016-02-17 22:14:02 -06:00
parent c30a935913
commit 93428108e7
2 changed files with 26 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ _338 TILs and counting..._
- [Reference A Commit Via Commit Message Pattern Matching](git/reference-a-commit-via-commit-message-pattern-matching.md)
- [Renaming A Branch](git/renaming-a-branch.md)
- [Resetting A Reset](git/resetting-a-reset.md)
- [Show The diffstat Summary Of A Commit](git/show-the-diffstat-summary-of-a-commit.md)
- [Single Key Presses in Interactive Mode](git/single-key-presses-in-interactive-mode.md)
- [Staging Changes Within Vim](git/staging-changes-within-vim.md)
- [Staging Stashes Interactively](git/staging-stashes-interactively.md)

View File

@@ -0,0 +1,25 @@
# Show The diffstat Summary Of A Commit
Use the `--stat` flag when running `git show` on a commit to see the
`diffstat` summary of that commit. For instance, this is what I get for a
recent commit to [delve](https://github.com/derekparker/delve):
```bash
$ git show 8a1f36a1ce --stat
commit 8a1f36a1ce71d708d1d82afbc2191de9aefba021
Author: Derek Parker <derek.parker@coreos.com>
Date: Wed Jan 27 23:47:04 2016 -0800
dlv: Flag to print stacktrace on trace subcommand
cmd/dlv/main.go | 45 ++++++++++-----------------------------------
terminal/command.go | 7 +++++--
2 files changed, 15 insertions(+), 37 deletions(-)
```
The following is a description of the `diffstat` program
> This program reads the output of diff and displays a histogram of the
> insertions, deletions, and modifications per-file.
See `man git-show` and `man diffstat` for more details.