How to link a work load item with a commited change?

拜拜、爱过 提交于 2019-12-24 04:16:33

问题


I am working with Git for Visual Studio Online

  1. I added a Product Back Log item.
  2. I added some files & commited the change. (It did not linked for some reason)
  3. I made some more commits to the project & synced.

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?


回答1:


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).

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.

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.



来源:https://stackoverflow.com/questions/21159644/how-to-link-a-work-load-item-with-a-commited-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!