Sebastian Zartner
Sebastian Zartner

Reputation: 20085

How to show history of different branch in EGit for Eclipse?

I want to cherry pick some commits of a specific git branch into my currently checked out branch.

To do that I would like to filter the history view EGit offers to see only that one branch.

I know that there's a toggle button that allows me to switch between the display of the commits of the current branch and all branches (Toggle button for all branches). This allows me to see the commits done in the other branch. Though with all the commits of the other branches shown, this gets confusing quickly.

Similarily, there is a button allowing me to select the input, for which the commits are shown (Button to switch the input, for which to show commits for). Though that button only allow to filter the commits by workspace resources of the currently checked out branch.

There is also a button to pin the current history view (Button to pin current history view), but it doesn't seem to work when I switch between the two branches, the view still gets refreshed.

So, Is there an option, that allows me to restrict the display of commits to a specific branch? Or is there an option to pin the view, so I can keep seeing the commits of the one branch when I check out the other branch?

Upvotes: 0

Views: 3266

Answers (2)

Sebastian Zartner
Sebastian Zartner

Reputation: 20085

Because I couldn't find an option how to restrict the shown commits to a specific branch, I filed a bug in Eclipse's bug tracker.

The answer there was that the code for the input only distinguishes between repositories and files and it currently disregards branches. So it looks like it is not possible to restrict the display of the commits to a specified branch at the moment.

Upvotes: 2

LMC
LMC

Reputation: 12662

This worked for Eclipse Oxygen:

  • Go to: Git Repositories view -> your repository -> branchA -> right-click and choose Show in > History -> (pin this view)
  • Do the same with other branch, a new view should be opened

Upvotes: 3

Related Questions