如何将工作负载项与已提交的更改链接? [英] How to link a work load item with a commited change?

查看:42
本文介绍了如何将工作负载项与已提交的更改链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Git for Visual Studio Online

I am working with Git for Visual Studio Online

  1. 我添加了产品待办事项日志"项目.
  2. 我添加了一些文件&提交更改.(由于某种原因未链接)
  3. 我对项目&已同步.

我的第一项更改未与后退"日志项&它仍然显示待处理任务.

My 1st change was not linked with the Back log item & it still shows as pending under tasks.

如何将工作项与第一次提交相关联?

How do I link the work item with my first commit?

推荐答案

通常要将提交链接到工作项,您只需在提交消息中引用工作项编号,例如 git commit -am"PBI#1234" .如果它不起作用,则可能是您在提交消息中输入了错字.

Normally to link a commit to a work item you just reference the work item number in the commit message, for example git commit -am "related to PBI #1234". If it didn't work, you may have made a typo in the commit message.

现在,考虑到您已经推送了更改,修改您先前的注释以更改消息将需要交互式的基础,并且推送结果将是一件坏事(我假设共享存储库).

Now, given you have already pushed your changes, amending your earlier comment to change the message would require an interactive rebase and pushing the result of that would be a bad thing (I'm assuming the repo is shared).

您可以做的是转到工作项,然后在链接"选项卡下,单击链接到..."图标以添加新的链接.选择提交",然后输入要链接到的提交的SHA1.

What you can do instead is go to the work item and under the Links tab, click the Link To... icon to add a new link. Select 'Commit' and then enter the SHA1 of the commit you want to link to.

如果您不知道SHA1,请不要担心.只需使用 ... 按钮浏览您的历史记录,然后选择您感兴趣的提交即可.

Don't worry if you don't know the SHA1. Just use the ... button to browse your history and select the commit you're interested in.

这篇关于如何将工作负载项与已提交的更改链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆