سؤال

The GitHb client installs Posh-Git as a ClickOnce application with a target of C:\Users\Administrator\AppData\Local\GitHub\GitHub.appref-ms --open-shell. Visual Studio 2013 does not like this when I plug it into the 'External Tools' area. I've tried pulling the arguments out, wrapping in quotes, etc.

The goal is to be in a project and quickly launch Posh-Git in the project directory I'm working in.

هل كانت مفيدة؟

المحلول

1.) Add external tools and point to a batch file. Add the arguments listed below in the image. This assumes that your Git repository is one folder up from a 'Solution' directory.

External Tools

2.) The batch file should have the following contents (Replace 'Administrator' with the appropriate user):

@echo off
echo Starting with switches:  %*
echo.
echo.
C:\Users\Administrator\AppData\Local\GitHub\GitHub.appref-ms %*

نصائح أخرى

To simply launch the GitHub for Windows shell, use the following values:

Command: %comspec%

Arguments: /c %localappdata%\GitHub\GitHub.appref-ms --open-shell

However, this will not start the shell in the project directory. I can't find a way to make the GitHub for Windows shell do that. I think it always uses the default clone path. To specify the directory, we need to go directly to PowerShell:

Command: powershell.exe

Arguments: -NoExit cd ""$(SolutionDir)""

If you have either GitHub for Windows or posh-git installed, this should work.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top