Reputation: 35812
Context
I am using VS 2015 and TFS as my version control. I do know how to get a history for a particular source file, and also know how to see in editor the picked version of that file.
Question
In the current version of a particular file I read a comment say
// This is a comment
I would like to find in which commit was that line committed. The obviuos solution is opening history, then the different versions of that file starting from initial commit, and searching for the text in the editor window until a looked text is found.
Is there any convenient solution for that?
Upvotes: 0
Views: 32
Reputation: 391276
Right-click inside the open file in Visual Studio, on the interesting line, and choose Source Control (bottommost menu) and then Annotate.
You'll see the file with changeset information along the left edge.
Note that this will only easily give you access to how the current file came to be, if you wish to dig through annotated historical versions it becomes a bit more cumbersome.
Upvotes: 2