Is there a quick way to “git diff” from the point or branch origin?

You can find the branch point using git merge-base. Consider master the mainline and dev the branch whose history you are interested in. To find the point at which dev was branched from master, run:

git merge-base --fork-point master dev

We can now diff dev against this basis:

git diff $(git merge-base --fork-point master dev)..dev

If dev is the current branch this simplifies to:

git diff $(git merge-base --fork-point master)

For more information see the git-merge-base documentation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)