Harsha M V
Harsha M V

Reputation: 54949

Git compare before Merging 2 branches

I have 2 branches which say incompatible when I call for pull request on Git Hub. Is there a way I can compare where the conflict is before I can merge the branches?

Upvotes: 2

Views: 107

Answers (1)

Supun Wijerathne
Supun Wijerathne

Reputation: 12958

try

Go to your branch,

git format-patch $(git merge-base HEAD otherBranch)..otherBranch --stdout | git apply --check -

otherBranch -> The name of the branch you want to compare with.

Upvotes: 4

Related Questions