0

I find sometimes I like to compare 2 branches using a diff tool that knows nothing about git.

So basically, a way to do a git diff that isn't version control aware.

For example, assume I had 2 branches I wanted to compare, master and develop.

What I've been doing is

  • checking the repo out into 2 folders
    • myrepo_master -> myrepo checked out to master
    • myrepo_develop -> myrepo checked out to develop
  • using some tool, like DiffMerge to compare the 2 folders.

Is there a way to do this with git itself, without having to check the branches out to 2 separate folders?

Brad Parks
  • 66,836
  • 64
  • 257
  • 336

1 Answers1

2

Maybe just do:

git diff master..develop

Reference: Comparing two branches in Git?

Piotr Wittchen
  • 3,853
  • 4
  • 26
  • 39
  • That seems to work, and as mentioned by @Lasse Vågsæther Karlsen, `git difftool -d master develop` seems to work, and uses the difftool I have configured as well – Brad Parks Oct 24 '19 at 16:43