I want to look at how my code base has grown over time. GitHub has a nice +/-
display along the list of checkins which gives a sense of this. Is there something similar I can use with my Google Code hosted repo or offline?

- 82,739

- 1,087
-
1I'm voting to close this question as off-topic because the usage of tools specific to software development. These questions belong on Stack Overflow, but this question is too old to migrate. – Thomas Owens Jul 16 '15 at 11:59
-
recommended reading: Where does my git question go? – gnat Jul 16 '15 at 12:00
2 Answers
There are a few options natively in Git to get data about the changes.
git log --stat
will show the amount each file was changed.
git whatchanged
gives some detail into the files that were modified.
git diff --stat <sha1> <sha2>
gives the files and the amount of changes between two commits.
There are many other blogs that give various formatted logs. A google search can point you at these. Also doing git log --help
will give the various options for formatting the history of your repo. Git has the ability to give you quite a bit of data through the various command line log
options (filtering by author, file, etc).

- 3,396
-
9Beautiful! Thanks. Now I also see
--numstat
provides a less sugary but clean alternative format. – Potatoswatter May 27 '13 at 07:03 -
29
-
2keep in mind that
git diff --stat <sha1> <sha2>
doesn't includes insertions and deletions in<sha1>
, so you would have to put thesha
of commit just before<sha1>
to includes<sha1>
– Vaibhav Vishal Feb 13 '19 at 13:48
If you know the commits you would like to compare, you could try using the git diff
command with the --stat
argument. It gives output like this:
$ git diff --stat HEAD^ HEAD
_layouts/default.html | 1 -
_sass/_variables.scss | 2 +-
_sass/main.scss | 42 +++++++++++++++---------------------------
3 files changed, 16 insertions(+), 29 deletions(-)

- 868
-
4Always love an example that works for most cases (HEAD - 1) instead of an abstraction. Thanks Mike! – SimplGy Apr 19 '16 at 22:30