Is it a way to open multiple Git differences views

Answered

Hi, I am working on a project involving two maven projects each one associated with its own Git repo.

Is it a way to open a Git | Compare With Branch view for each of them, or to pin those views?

Thanks
/Juan 

0
6 comments

Hi,

I have one solution for this:

Let’s say we have Repo_1 and Repo_2.

  1. Add the remote URL of Repo_2 to Repo_1 and fetch the branch you want to compare.
  2. Open IntelliJ → Go to Git log → Select the branch from Repo_1.
  3. Open another Git log tab (there’s an option to open a new tab).
  4. In this new tab, under the branch column, you can see the remote alias of Repo_2. From there, select the branch to compare.

Another possible solution:
You can do a manual comparison by opening two instances of IntelliJ, one for Repo_1 and another for Repo_2.

I hope this may help your problem at least for some extent.

0

Hi,

What is the project structure? Are they under the same directory?

If so, you can open both of them inside IDEA and compare in the git log:

And this view can be pinned:
 

 



 

0

Thanks for your replies, but I am not trying to compare the branches with each other, but each one with its own master, to be able to see concurrently the changes in both of them.

Currently when I Git | Compare with branch: master the second it opens in the same view/window that the first, overriding it.

Thanks
/Juan

0

Can you share screenshot on how do you exactly compare and how is comparison opened? 

0

This is the project structure:  
 


What I want is to view comparison of cdr project with master and hapi-fhir project with master at the same time.
Currently, when I open the second, it overrides the first.

Comparisons are opened by right clicking each project an then Git | Compare with branch
 

0

It should not override it. 

You can see I have two projects open, 

dinotest on branch dino + dinotestino on branch awe. 

 

Additionally, you also should have two master branches. Can you share a video of you comparing it? 

0

Please sign in to leave a comment.