eclipse - 如何在egit的历史 View 中显示标签?

标签 eclipse git egit

我有一个包含一些悬空提交的存储库:

o (master) commit 3
o commit 2
o
| o (tag: danglings) dangling commit 2
| o dangling commit 1
|/
o commit 1
o initial commit

我已经用标签标记了最新的悬空提交,以确保它不会丢失,以防万一我在将来某个时候需要它。

但是,当在egits历史记录中查看该存储库时,我没有得到悬空提交。它们根本就没有显示出来。当我创建一个指向悬挂提交 2 的分支时,会显示包括该标记的两个提交。

如何防止这种情况发生?我想看到所有内容,而不仅仅是 egit 历史 View 中的分支。

编辑:添加了一个漂亮的屏幕截图蒙太奇:

screenshot montage 第一个显示 master 已 checkout ,并且不存在悬空分支。当然,悬空提交悬空标签是存在的!

在第二个分支上,我创建了一个名为 dangling 的分支,该分支指向标有 dangling 标签的提交,并将其 checkout 。

请注意,当我在第二张图片上查看 master 时, View 不会改变(除了粗体书写的 masterHEAD 被移动)。

最佳答案

robinst评论中提到:

This was simply a bug in EGit and happened only with annotated tags, please see bug 417655 which proposes the fix in org.eclipse.egit.ui.internal.history.GitHistoryPage.
Target Egit 3.1


原答案:

这个 Egit 练习讨论了历史 View :

https://raw.github.com/stefanlay/gittraining/master/exercises/egit/git/history-view-6.png

考虑此 View 中可用的不同按钮:

https://raw.github.com/stefanlay/gittraining/master/exercises/egit/git/history-view-buttons.png :

该教程提到:

TIP: If you got lost with the different filters and the history doesn’t show what you expect, set it back to show everything.
Therefore make sure that 'Show all branches and tags' (a) is turned on and 'Show all changes in repository' (e) is selected.

这两个按钮可能会显示所有可访问(至少已标记)提交。


Filtering settings 的“Egit User Guide”部分很清楚:

The next four toggle buttons in the view toolbar control how the displayed commits are filtered with respect to the current input.

http://wiki.eclipse.org/images/0/01/Egit-0.9-history-view-config.png

The buttons are working as radio buttons, i.e. one of the four buttons must always be down.

  • If the "Repository" button is down, the commit log is not filtered and shows all commits reachable from the currently checked out branch (or all commits, see below about the "All Branches" action)
  • If the "Project" button is down, the commit log is filtered to show all commits which affected any of the resources in the project containing the current input
  • If the "Folder" toggle is down, the commit log is filtered to show all commits which affected any of the resources in the parent folder of the current input
  • If the "Resource" button is down, the commit log is filtered to show only commits which affected the current input; the view menu item Show > Follow Renames allows to toggle whether renames of the selected resource should be followed by this filter

Note that not all combinations of filter setting and current input are meaningful; for example, if the current input is a project, the "Project" option is in fact the same as the "Resource" option.

但是“All branches ”部分添加:

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.

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

就您而言,我不确定单独由标签引用时会显示提交。
只有分支才能使这些提交可见。

关于eclipse - 如何在egit的历史 View 中显示标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18739746/

相关文章:

java - Java项目中的build.xml

java - 如何获取其他设备的对端IP地址

git - 是否可以使用 Bitbucket 在 TFS 上进行持续集成?

Eclipse EGit Checkout 与文件 : - EGit doesn't want to continue 冲突

Git 中的 Java config.properties 文件

android - 禁用 2g/3g android

eclipse - 以编程方式滚动 NatTable 到选定的行

git - 推送后回滚远程 repo

git - 如何在命令行中查看git存储库中的所有标签

eclipse - 为什么不建议将 Eclipse 项目文件夹作为 Git 存储库?