Git – How to link already existing TFS-git commit to TFS work item

gittfs

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?

Best Answer

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.