Hari M
Hari M

Reputation: 425

Eclipse Git - Compare different branch previous version

In git using eclipse i want to current commit of one Branch to the previous version different Branch.

Using "Compare With" option in eclipse, i was able to compare with different branch or with same branch previous versions. But i want to compare with different branch's previous version.

For e.g Branch A has 3 commits aa ab and ac. Branch B has 3 commits ba bb and bc.

I want to compare branch B's bc commit (latest) with Branch A's aa commit (not with command line)

Upvotes: 1

Views: 4504

Answers (2)

rini simon
rini simon

Reputation: 1

  • Project file - Right Click -> Team -> Show in history
  • ctrl+click the two versions you would like to compare
  • Right Click -> Compare with each other

This will bring up the two versions you would like to compare

Upvotes: 0

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520978

It appears that the eGit plugin supports what you want to do:

Comparing Two Commits

  • Select a resource in the Package Explorer
  • click Team > Show in History or Compare With > History... (the latter for files only)
  • in the commit graph select two commits
  • right-click Compare with each other
  • this will open a compare dialog showing the changes between the two selected commi
  • you can also open a Git Tree Compare view by right-clicking Compare with each other in Tree

The trick will be in finding the commit graph view so that you can manually choose the bc and aa commits from your two branches.

Upvotes: 1

Related Questions