Back

Explore Courses Blog Tutorials Interview Questions
+5 votes
2 views
in DevOps and Agile by (19.4k points)
edited by

I have two branches, branch_1 and branch_2.

I want to see the differences between the two branches in Git.

1 Answer

+5 votes
by (27.5k points)
edited by

To produce the difference between the tips of the two branches.

git diff <branch_1>..<branch_2>

To find the difference from their common ancestor to test, you can use three dots instead of two:

git diff <branch_1>...<branch_2>

For more information regarding git and version controlling tools please go through the following tutorial that helps.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers

501 comments

104k users

Browse Categories

...