2

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.

1737973
  • 159
  • 18
  • 42
  • What do you mean? If there is a large difference between two commits then why would you want a smaller diff? Can you show the commands you used for this smaller diff? And include the output as well? – evolutionxbox Sep 24 '19 at 22:01
  • I mean the smaller diff being shown when committing or merging. I'd need to trigger that from branches diffing. – 1737973 Sep 24 '19 at 22:05
  • That’d be a diff between the state in the current commit and its parent. That’s not a diff between two branches. Are you aware that a commit doesn’t contain a diff? – evolutionxbox Sep 24 '19 at 22:06
  • Branches diffing and parent-child diffing are cases of rev to rev diffing. – 1737973 Sep 24 '19 at 22:07
  • 2
    The diff between a parent and child is usually smaller because the difference between them is usually smaller. If the different between two branches is great then the difference is great. Unless I’m misunderstanding you...? Can you provide an example of what you mean? – evolutionxbox Sep 24 '19 at 22:10
  • Alright, I'll share a better example later. – 1737973 Sep 24 '19 at 22:14

1 Answers1

2

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).

1737973
  • 159
  • 18
  • 42