66

In Visual Studio 2013 update 2 with Git integration, is there a way to show in the editor who last modified a line? (like the git blame command?)

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
Frank Kusters
  • 2,544
  • 2
  • 21
  • 30

1 Answers1

99

TFS (and so does VS) uses the Term "Annotate" instead of "Blame", just right click on the editor when you have a file open, then click Source Control, Annotate.

I'm sure there are other ways to do it, either from the menu, toolbars, solution explorer, etc.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141
  • 4
    To enable this, select Tools > Options... > Source Control > Microsoft Git Provider. – yoyo Jul 29 '15 at 17:08
  • @yoyo or just select the git repo in the team explorer window. – DaveShaw Jul 29 '15 at 20:12
  • @DaveShaw Good suggestion. *My* repo opened automatically (and annotate works fine for me) but a teammate is having trouble. He does appear to have the repository open and to get some git functionality, but most operations result in an error "Value cannot be null. Parameter name: destination" - ring any bells? (Our solution and all its projects and files are in the git repository.) – yoyo Jul 29 '15 at 21:53
  • @yoyo not off the top of my head other than check he's up to date, probably best to get him to raise a new question. – DaveShaw Jul 29 '15 at 22:05
  • @DaveShaw strangely he's an update ahead of me on Visual Studio. He did say there's a .NET framework problem on his system, possibly that's to blame. Oh well, thanks anyway. – yoyo Jul 29 '15 at 23:39
  • On Visual Studio 2017, this has been renamed a bit for Git: Right-click -> Source Control -> Blame (Annotate) – Structed Mar 12 '18 at 21:15
  • 9
    In VS 2020, it is Right-click -> Git -> Blame (Annotate) – sibbl Jan 07 '21 at 10:04