How do you view merge changes in a single git command?

"git diff master ... topic" is wrong.

If master was merged into the topic after branching "git diff master ... topic" will show the changes that are already in master.

What you want is equivalent to the following:

git merge topic --no-commit
git diff --staged
git merge -abort

+3


source to share


1 answer


You can write a bash script with these commands.



#!/bin/sh

git merge topic --no-commit
git diff --staged
git merge --abort

      

+3


source







All Articles