gitgit-branchgit-diffdiffstat

How to Git diff two branches but showing an output similar to that of Git commit?


If I do:

$ git checkout some_branch
[...]
$ git diff another_branch

It'll show a large diff between the branches.

Now there's a simplified, smaller1 diff shown after applying a commit, or merge, I guess cherry picks too.

How can I show that smaller1 diff when diffing two branches one branch from another branch?

1: Because format, not because contents.


Solution

  • I found what I was looking for, at the manual page.

    $ git diff --stat master
    

    Will do what I need (having checked out the feature branch am diffing).