简体   繁体   English

如何在EGit for Eclipse中显示不同分支的历史记录?

[英]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. 我想挑选一些特定git分支的提交到我当前签出的分支。

To do that I would like to filter the history view EGit offers to see only that one branch. 为此,我想过滤EGit提供的历史视图以仅查看该分支。

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 ( 我知道有一个切换按钮,可让我在当前分支和所有分支的提交显示之间进行切换( 所有分支的切换按钮 ). )。 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 ( 类似地,有一个按钮允许我选择输入,为此显示提交( 用于切换输入的按钮,针对该输入显示提交 ). )。 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 ( 还有一个按钮可以固定当前历史记录视图( 用于固定当前历史记录视图的按钮 ), 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? 还是有固定视图的选项,以便当我签出另一个分支时可以继续查看一个分支的提交?

This worked for Eclipse Oxygen: 这适用于Eclipse Oxygen:

  • Go to: Git Repositories view -> your repository -> branchA -> right-click and choose Show in > History -> (pin this view) 转到: Git存储库视图->您的存储库-> branchA->右键单击并选择Show in> History ->(固定此视图)
  • Do the same with other branch, a new view should be opened 与其他分支相同,应打开一个新视图

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 . 因为我找不到如何将显示的提交限制到特定分支的选项,所以我在Eclipse的错误跟踪器中提交了一个错误

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. 因此,目前似乎无法将提交的显示限制在指定的分支上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM