0

I have two branches one is ok the other introduces a problem. I want to download both branches to separate folders so I can use "Beyond Compare" to analyse and find the problem.

I've create two folders on the local file system using the commit ID of the working and broken branches how do to this, the broken commit is 114ae931 and the working commit is 0647841c.

SPlatten
  • 5,334
  • 11
  • 57
  • 128
  • 1
    Compare as in "diff"? Would `git diff 114ae931 0647841c` work? – evolutionxbox Sep 07 '20 at 12:39
  • 1
    Does this answer your question? [Showing which files have changed between two revisions](https://stackoverflow.com/questions/822811/showing-which-files-have-changed-between-two-revisions) – limido Sep 07 '20 at 12:40
  • No, not really because I want to use Beyond Compare to do the comparison, using git with difftool results in using vi which isn't a nice experience. – SPlatten Sep 07 '20 at 12:50

3 Answers3

0

use

$ git diff branch1..branch2

edit: look at this : https://devconnected.com/how-to-compare-two-git-branches/

CLAIN Cyril
  • 123
  • 9
  • Beware though, this is not a symmetric difference, if `branch2` has commits unknown to `branch1`, their diff won't show up with your example. Consider using `...` operator – Romain Valeri Sep 07 '20 at 12:43
  • Yes, done that already,but there is so much of it and its not as easy to follow as using Beyond Compare. – SPlatten Sep 07 '20 at 12:44
0

If you've set difftool to bc, you can use the following command:

git difftool 114ae931 0647841c
Enrico
  • 120
  • 5
0

You can also use the SHA

git diff <sha1> <sha2>
CodeCool
  • 193
  • 2
  • 12