Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I view the history of a single branch in EGit for eclipse

Tags:

git

eclipse

egit

When reviewing code in eclipse using EGit plugin, before merging it to the develop branch, you switch to the branch and see what files changed with the commits on that branch. For this I would like to see -only- the commits to the current checked out branch. When using Team -> Show in History, I get the complete history across all branches.

How can I view only the commits to the current checked out branch, instead of having to search trough the complete GIT history to find the relevant commits?

Using review tools like Gerrit are not an option.

like image 790
Stijnvdk Avatar asked Jul 08 '14 09:07

Stijnvdk


1 Answers

You can check the filter button in the History View:

All Branches

http://wiki.eclipse.org/images/3/3b/Egit-0.9-history-view-allbranches.png

This toggle activates the "All Branches" mode.
By default, only those commits are shown in the commit log that can be reached from the currently checked out commit, i.e. the Commit Graph ends with the currently checked out commit and newer commits are not shown.
If this button is down, all commits will be shown in the commit log.
This is illustrated in the following picture from our example. The branch "beforeSplit" is currently checked out; by activating the toggle, the newer branches will become visible:

http://wiki.eclipse.org/images/c/c7/Egit-0.9-history-view-allbranchesToggle.png

And you need to combine that with:

"Additional Refs" toggles the visibility of certain Refs created during actions like fetch, rebase, merge, for example FETCH_HEAD, ORIGIN_HEAD... This can be helpful to remove clutter from the history view.

http://wiki.eclipse.org/images/0/0e/Egit-3.1-HistoryViewSettings.png

like image 136
VonC Avatar answered Oct 10 '22 19:10

VonC