Explore Courses Blog Tutorials Interview Questions
+5 votes
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.

Browse Categories