eclipse EGit:如何创建新标签?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17993837/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:00:46  来源:igfitidea点击:

EGit: how to create a new tag?

eclipseegit

提问by Luís de Sousa

I'd like to create a new tag using EGit. According to the manualthere are two ways of doing it:

我想使用 EGit 创建一个新标签。根据手册有两种方法:

  1. Select Team> Advanced> Tag...
    • But I don't have the Advancedsub-menu in the Teammenu.

  2. Execute Create Tag...on a commit in the History view.
    • But I don't have this button/option in the History view.
  1. 选择团队>高级>标记...
    • 但是我在团队菜单中没有高级子菜单。

  2. 在 History 视图中的提交上 执行Create Tag...。
    • 但是我在历史视图中没有这个按钮/选项。

How do I do it? Thank you.

我该怎么做?谢谢你。

My setup:

我的设置:

Version: Juno Service Release 2
Build id: 20130225-0426
Eclipse EGit 3.0.1.201307141637-r

版本:Juno Service Release 2
Build id:20130225-0426
Eclipse EGit 3.0.1.201307141637-r

采纳答案by Luís de Sousa

A tip at the Eclipse forumshowed how:

Eclipse 论坛上的一个提示展示了如何:

  1. Switch to Git Repository Perspective;
  2. Check out the local branch to tag into the Git Repositories View;
  3. In the project tree right click on Tags -> Create Tag
  4. Enter tag name and tag message.
  1. 切换到 Git 存储库透视图;
  2. 查看本地分支以标记到 Git 存储库视图;
  3. 在项目树中右键单击标签 -> 创建标签
  4. 输入标签名称和标签消息。

After this the tag must be pushed to the remote repository, but that is something that can be made in the regular coding perspective.

在此之后,必须将标签推送到远程存储库,但这可以在常规编码的角度进行。

回答by user2944582

I'm using Juno as well and I have the Team->Advanced->Tag menu in the context menu of the project. (Right click on the project connected to the GIT)

我也在使用 Juno,我在项目的上下文菜单中有 Team->Advanced->Tag 菜单。(右键点击连接到GIT的项目)

After creting the tag V.01 for instance, you need to Push the tag to the repository.

例如创建标签 V.01 后,您需要将标签推送到存储库。

In the Git Repositories view, you have the Tags under you project. In the context menu of your tag you have the Push Tag menu.

在 Git Repositories 视图中,您的项目下有标签。在标签的上下文菜单中,您有推送标签菜单。

Target Ref Name: should be something like refs/tags/V0.1 (without refs/tags/ path you will get an error "funny refname" )

目标引用名称:应该类似于 refs/tags/V0.1(没有 refs/tags/ 路径,您将收到错误“funny refname”)