Home > front end >  How to compare differences on commit on a single file between 2 branches in Git?
How to compare differences on commit on a single file between 2 branches in Git?

Time:06-06

A branch and B branch both have A, B, C, D commits and in B, C commits, file xxx.java is changed.

but A branch has E,F,G,H commits and in F, H commits, file xxx.java is changed.

Is there a command, after

$git command xxx.java branchA branchB

I can get:

F -- F commit id(for example, 1fd3bb10d0d8b63c20cf0b2aa0c6f92812cb7b7f)
H -- H commit id

( I don't need the difference in the specific content of the file, it's something that interferes and wants to be deleted )

And does IDEA have a visual tool for this situation?

Thanks a lot.

CodePudding user response:

It seems you just need a history of specific files across all branches. IntelliJ can show it for you - call Git | Show History on a file, and then enable the Show All Branches on the toolbar. enter image description here

  • Related