Is it possible to get history for specific line of code in Visual Studio, when using TFS as source control?
Before I used another source control (Vault), and I was able to get history for line of code and check who added/modified it. It looks like TFS lacks such functionality. Are there any reporting tools that can do this.
I'm using Visual Studio 2010 with TFS 2010.
Open the file to view the history, and then Press F1 and select/type "Git: View History", "Git: View File History" or "Git: View Line History".
The Go To Line dialog box lets you move to a specific line in the active document. To access this dialog box, open a document for editing, and then select Edit > Go To > Go To Line or press Ctrl+G.
To enable or dai the “Track Change” features, Goto Tools > Options > TextEditor . In General section, you can checked or Unchecked the “Track Change” option . Key Note : While you are using “Track Change” option, you have to select “Selection Margin” display option other wise, “Track Change” Won't work.
As far as I know, there is nothing like the complete history of one line, which could be very confusing and hard to identify for a version control. Nevertheless, TFS can show you who change the specific line the last time. Two ways to get this:
Browse in Source Control Explorer to the file, right click it and in the middle of the context menu, you will find the option Annotate
, which will show it to you.
Open the file you are interested in. Right click somewhere in the edit pane and choose Source Control -> Annotate
This is tedious, but it works, if you are desperate: You have a line whose history you'd like to trace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With