Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link already existing TFS-git commit to TFS work item?

Tags:

git

tfs

In the past out team was developing projects with TF Source Control. Now we started developing a new project on TFS 2013 with bundled in it Git as VCS.

Recently I accidentally made a commit to new project without linking work item to it. As in similar situations in the past I opened corresponding work item in VS 2013 and then opened tab "All Links" in it to make a link to commit. I noticed that another commits were linked with type "Fixed in Commit". I pressed button "Link to" and then tried to find there corresponding link type, but there were no such. There were only "Changeset" link type related to code but it shows me only TFVC changesets in other Team Projects but not Git commits.

I tried another way. I opened another commit from this work item, opened history of one file that I changed in my "unlinked" commit and double clicked on last commit, so VS opened "Commit Details" window with my commit. But there were no buttons allowing me to link this commit to work item from this window either.

Are there any way or it is planned to do in future versions of VS/TFS?

like image 884
v.karbovnichy Avatar asked Jul 03 '14 13:07

v.karbovnichy


People also ask

How do you link work items in Azure Devops pull request?

You can link work items to existing builds from the Add link dialog. From the Links tab of a work item, choose Add link>Existing item. From the Add link dialog, choose one of the build link types—Build, Found in build, Integrated in build— and specify the build number.

How do I commit in TFS?

To commit your all of your changes go to Team Explorer >> under Project section you will see Changes section (This is similar to TFVC Pending Changes). You will see all your changes here in this section. You need to Stage the necessary files that you want to commit. To do so right click on the files and select Stage.

What is the git commit command?

The git commit command captures a snapshot of the project's currently staged changes. Committed snapshots can be thought of as “safe” versions of a project—Git will never change them unless you explicitly ask it to.


1 Answers

You will have to link this work item from TFS Web Access at the moment. There you can link the work item and have access to the expected "Commit" option:

enter image description here

Indeed, this looks like something that we should improve in future versions of Visual Studio.

like image 67
Edward Thomson Avatar answered Nov 03 '22 03:11

Edward Thomson