Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to a file in the Source Control Explorer in Visual Studio

I love the Solution Explorer > Right-click > "Open Containing Folder" feature of the PowerCommands extension for Visual Studio 2010. I want the equivalent of a "Jump to location in Source Control Explorer" feature. How can I find out the location in TFS of a given open file, or a file in the solution explorer (or a file in the solution navigator in you have the Productivity Power Tools extension)?

The best answer would be a couple of mouse clicks and no keyboard. Next best answer would be a hotkey mapping.

The only solution that I have found so far is to use the Productivity Power Tools extension which has the feature "Find in Source Control". A file in the results list can be right-clicked to "Open folder in Source Control Explorer". The drawbacks to this solution is that is takes many clicks, and the search results can match more than one file if files exist with the same name in different folders.

like image 568
Tim Partridge Avatar asked Dec 13 '10 18:12

Tim Partridge


People also ask

How do I search for a file in Source Control Explorer?

Right-Click In the File List, right-click the file you want to check in and select Source Control > Check In (for selected files) or Source Control > Project > Check In All (for all files in the project). Local Toolbar In the File List, select the file(s) you want to check in.

How do I use Visual Studio Source Control Explorer?

Source Control Explorer is available in Visual Studio, but isn't opened by default when working with a project managed in TFVC. You can open the Source Control Explorer window: From the Team Explorer home page (Keyboard: Ctrl + 0, H), choose Source Control Explorer.

How do I add a file to Source Control in Visual Studio?

In Visual Studio, choose File, Open, Project/Solution, and then use the Open Project dialog box to open the solution. In Solution Explorer (Keyboard: Ctrl + Alt + L), select the solution, open its context menu, and then choose Add Solution to Source Control.

Where is the file Explorer in Visual Studio?

By default, the Solution Explorer tool window appears as a pane in the upper-right side of the Visual Studio integrated development environment (IDE). If you don't see the Solution Explorer tool window, you can open it from the Visual Studio menu bar by using View > Solution Explorer, or by pressing Ctrl+Alt+L.


1 Answers

There is a stand-alone extension that you can download, called Locate in TFS, within Visual Studio.

"Locate in TFS" on TFS Gallery

"Locate in TFS" on GitHub

This also works on files that you "Exclude from source control", as many developers do with the web.config files.

psulek's post, above, mentions this as part of VSCommands, but I prefer the stand-alone extension.

like image 135
cat5dev Avatar answered Oct 10 '22 02:10

cat5dev