Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse EGit | Branch Diff

Currently using Eclipse Mars.1 and installed EGit from Eclipse MarketPlace.

Does Eclipse EGit has a similar feature of SourceTree wherein you could pick N or all commits inside a branch and compare it (git diff) to which branch is was checked-out from?

I was trying to follow low-level git branching standards relying only on Eclipse EGit tools (without terminal, SourceTree, Pull Request functionality, et.al.). But I'm only limited to seeing commit-diffs and not a branch-commit-diff view.

like image 348
David B Avatar asked Nov 23 '15 15:11

David B


People also ask

What is EGit in Eclipse?

Eclipse EGit™ EGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile.

How do I switch between branches in Eclipse?

To create a new branch in your repository, right click a shared project and navigate to Team => Switch to => New Branch… from the context menu. Select the branch you want to create a new branch from, hit New branch and enter a name for the new branch. The new branch should appear in the branch selection window.


1 Answers

I think you can compare anything to anything in egit.

e.g.:

  • You can click on any two commits in the History view and, from context menu, choose Compare With Each Other

  • You can select two branches in the Git Repositories view and, from context menu, choose Synchonize with each other

  • You can right click on any branch in the Git Repositories view and choose Synchonize with workspace

And the list goes on ad infinitum (practically).

like image 67
Jonah Graham Avatar answered Sep 22 '22 19:09

Jonah Graham