git 如何使用 TortoiseGit 在不推送提交到远程存储库的情况下推送标签?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29958930/
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 10:57:32  来源:igfitidea点击:

How push tag without push a commit to remote repository with TortoiseGit?

gittortoisegitgit-tag

提问by Cherry

A console git client has a git push origin <tag_name>command for pushing a tagwithout commit to a remote repository. Is there analog in TortoiseGit GUI?

控制台 git 客户端有一个git push origin <tag_name>命令,用于在不提交到远程存储库的情况下推送标签。TortoiseGit GUI 中是否有模拟?

回答by user3290142

  1. After Creating the Tag
  2. Right click in the repo folder
  3. From the context menu select "Git Sync..."
  4. Change the "Push" drop down to "Push tags" (this will initiate the push)
  1. 创建标签后
  2. 右键单击 repo 文件夹
  3. 从上下文菜单中选择“Git Sync...”
  4. 将“推送”下拉菜单更改为“推送标签”(这将启动推送)

Git Sync window

Git 同步窗口

回答by MrTux

In order to push a specific tagjust enter the <tag_name>in the textbox for Local(it is also possible to select the tag on the RefBrowser after clicking on "?") and empty the Remotetextbox within the Refgroup.

要推送特定标签,只需<tag_name>在文本框中输入for Local(也可以在单击“?”后在 RefBrowser 上选择标签)并清空组Remote内的文本框Ref

enter image description here

在此处输入图片说明

This will result in git push origin <tag_name>.

这将导致git push origin <tag_name>.

If you want to push all tags at once, you can use the Sync dialog (select "Push tags" on the "Push" drop down) as described in https://stackoverflow.com/a/38838166/3906760.

如果您想一次推送所有标签,您可以使用同步对话框(在“推送”下拉菜单中选择“推送标签”),如https://stackoverflow.com/a/38838166/3906760 中所述