Skip to Main Content
Pragmatic Guide to Git
book

Pragmatic Guide to Git

by Travis Swicegood
November 2010
Beginner content levelBeginner
160 pages
2h 50m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Git
33 Generating Statistics About Changes

The individual commit’s changes are important, but viewing those changes in aggregate through statistics can provide you with a unique view of the project. Git helps you do that through the various statistical outputs it generates.

Git’s git diff --stat is the most straightforward of the displays. It takes one or two commits—remember, git diff assumes HEAD as its second commit if you don’t specify it—and displays stats regarding the changes rather than displaying the diff output. It includes file-by-file changes in addition to the summary statistics. Git uses the diffstat command for this, so the output may look familiar if you’re used to that program.

Sometimes all you need is the final line of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pragmatic Version Control Using Git

Pragmatic Version Control Using Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git for Programmers

Git for Programmers

Jesse Liberty

Publisher Resources

ISBN: 9781680500028Errata