Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i set up SourceTree as external tool in Visual Studio to view log for current file?

When right clicking a file in the SourceTree log I can choose "Log selected..." and get a log view for that specific file. Is there any way I could set up SourceTree as an External Tool in Visual Studio and pass it $(ItemPath) to have it open that log view for the current file.

I'd like a way to to view the log for a specific file without having to find the file in a commit first.

If possible I'd like to also set up the "Blame selected..." option from sourcetree as an external tool for the current file.

I'm using SourceTree with Git and Visual Studio 2012.

like image 500
Dan Pettersson Avatar asked Nov 29 '13 15:11

Dan Pettersson


1 Answers

Visual Studio 2012 means:

  • either using Git Extensions, and you can easily call a log on a specific file there.
    http://gitextensions.googlecode.com/files/FileHistory205.png

  • or using VS Tools for Git extension (included by default is VS 2013), and there you have to select the file in the explorer to see its history:
    http://i.msdn.microsoft.com/dynimg/IC697666.png
    But:
    That doesn't mean you have too "search" for that file though, since you can synchronize the Editor with the Explorer:

    Tools - Options - Projects and Solutions - General - Track Active Item In Solution Explorer

(or use this extension).

That seems easier than install/declare a third-party tool.

like image 66
VonC Avatar answered Oct 16 '22 03:10

VonC