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.

6
  • 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? Commented Sep 24, 2019 at 22:01
  • I mean the smaller diff being shown when committing or merging. I'd need to trigger that from branches diffing. Commented Sep 24, 2019 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? Commented Sep 24, 2019 at 22:06
  • Branches diffing and parent-child diffing are cases of rev to rev diffing. Commented Sep 24, 2019 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? Commented Sep 24, 2019 at 22:10

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.