How to compare branches in GitHub?

· · 2384 views

I'm looking for ways to compare multiple git branches.

0
1 Answer

In order to compare two branches easily, you have to use the “git diff” command and provide the branch names separated by dots.

$ git diff branch1..branch2

Using this command, Git will compare the tip of both branches (also called the HEAD) and display a “diff” recap that you can use to see modifications. In short, it will show you all the commits that “branch2” has that are not in “branch1”

0

Please login or create new account to participate in this conversation.