简体   繁体   English

在VSO或VS2015中创建Git分支标记

[英]Creating Git branch tag in VSO or VS2015

Is there a way to create a branch tag in vso? 有没有办法在vso中创建分支标记?

Also, I've tried creating a tag in VS2015 and push a change commit to vso, but I'm not seeing the tag in vso. 另外,我尝试在VS2015中创建一个标签并将更改提交推送到vso,但我没有在vso中看到标签。 Just wondering if this VS2015 <-> VSO tagging feature is in place? 只是想知道这个VS2015 < - > VSO标记功能是否到位?

The tag you created in VS2015 is in local repository. 您在VS2015中创建的标记位于本地存储库中。 VS2015 cannot push the tag to remote repository for now. VS2015目前无法将标签推送到远程存储库。 You need to push the tags to remote repository by following command manually: 您需要手动执行以下命令将标记推送到远程存储库:

git push --tags

After executing this command, you will see the tags in VSO. 执行此命令后,您将在VSO中看到标记。 在此输入图像描述

I know it wasn't available in Visual Studio 2015, but in Visual Studio 2017, I've created tags by right-clicking on the commits when viewing the history of a branch. 我知道它在Visual Studio 2015中不可用,但在Visual Studio 2017中,我通过在查看分支的历史记录时右键单击提交来创建标记。

I didn't realize they weren't pushed with Sync . 我没有意识到他们没有被推送Sync So I just recently found you need to access the Tags menu and hit Push All to push the tags to the remote repository: 所以我最近发现你需要访问Tags菜单并点击Push All将标签推送到远程存储库:

VS2017标签Git窗口

And Eddie Chen's answer obviously still works too in VS2017. 而且,在VS2017中, Eddie Chen的答案显然仍然有效。

Just looking into this for myself. 只是为自己调查这个。 We found the label feature that I think does the same thing. 我们发现标签功能我认为是一样的。 Right click on the branch in the source control explorer, go to advanced, apply label. 右键单击源代码管理资源管理器中的分支,转到高级,应用标签。 Hope this works. 希望这有效。 Not sure if it's what you're after, but we're going to try it. 不确定这是不是你想要的,但我们会尝试一下。

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

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