Alex Glikson
Alex Glikson

Reputation: 441

show diff between diverged github branches?

I have two github branches, let's call them 'alt' and 'master'. 'Alt' was created from master, and has several additional commits. Meanwhile, several other commits have been pushed to 'master', diverging the two branches. Now, I understand that I could try merging them back, potentially fixing conflicts manually (and I know that there will be lots of conflicts). The question is: can I see the diff and/or potential merge conflicts visually using github UI? Or I have to use some other tool?

Upvotes: 2

Views: 631

Answers (3)

dr. strange
dr. strange

Reputation: 665

You can use git mergetool after merge failure. Mergetool available like: meld, kdiff3, bcompare, p4merge

git mergetool [--tool=<tool>]

or you can set in global config.

git config --global merge.tool [tool]

Upvotes: 2

Mark Adelsberger
Mark Adelsberger

Reputation: 45649

Keep in mind that seeing the diff between the branches is somewhat a different thing from seeing potential conflicts, because conflicts have to do with the relationship between each branch's diff from the merge base.

Especially if you're wanting to work through a particular GUI, which might make it harder to use uncommon commands, it seems like the easiest way to see potential conflicts is to initiate the merge. You can always abort the merge once you've seen what you need to see.

Upvotes: 2

Adil B
Adil B

Reputation: 16806

You should be able to do this via the Compare UI.

Fill in the <org> and <reponame> in the URL below to view a comparison between your master and alt branches:

https://github.com/<org>/<reponame>/compare/master...alt

Upvotes: 0

Related Questions