From a0780b59b56528a2dd3034997c28c8c3a5a38e29 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Fri, 17 Nov 2017 08:58:17 -0600 Subject: [PATCH] Add Include Some Stats In Your Git Log as a git til --- README.md | 3 +- git/include-some-stats-in-your-git-log.md | 34 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 git/include-some-stats-in-your-git-log.md diff --git a/README.md b/README.md index 65645c8..030f961 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_588 TILs and counting..._ +_589 TILs and counting..._ --- @@ -163,6 +163,7 @@ _588 TILs and counting..._ - [Grep For A Pattern On Another Branch](git/grep-for-a-pattern-on-another-branch.md) - [Grep Over Commit Messages](git/grep-over-commit-messages.md) - [Ignore Changes To A Tracked File](git/ignore-changes-to-a-tracked-file.md) +- [Include Some Stats In Your Git Log](git/include-some-stats-in-your-git-log.md) - [Intent To Add](git/intent-to-add.md) - [Interactively Unstage Changes](git/interactively-unstage-changes.md) - [Last Commit A File Appeared In](git/last-commit-a-file-appeared-in.md) diff --git a/git/include-some-stats-in-your-git-log.md b/git/include-some-stats-in-your-git-log.md new file mode 100644 index 0000000..f9bf00e --- /dev/null +++ b/git/include-some-stats-in-your-git-log.md @@ -0,0 +1,34 @@ +# Include Some Stats In Your Git Log + +A simple `git log` command is going to give you a concise set of information +for each commit. Usually it is enough info. When it's not, `git log` can +provide additional information with the right flags. To include overall and +per-file stats on the number of insertions and deletions, use the `--stat` +flag. + +```bash +$ git log --stat +commit 66e67741a1cd6857a4467d1453c9f17ef5849f20 +Author: jbranchaud +Date: Mon Nov 13 21:24:41 2017 -0600 + + Add Focus The URL Bar as an internet til + + README.md | 3 ++- + internet/focus-the-url-bar.md | 10 ++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +commit 9241e3919ef1e4f68b71a1491d368ae6361084aa +Author: jbranchaud +Date: Sat Nov 11 11:41:40 2017 -0600 + + Add Freeze An Object, Sorta as a javascript til + + README.md | 3 ++- + javascript/freeze-an-object-sorta.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+), 1 deletion(-) + +... +``` + +See `man git-log` for more details.