I have installed those below on my Windows 10 x64:
I want to use "Git" Sublime package but cannot find how to configure git path.
I get this error when I try, for example, git fetch
command:
'git' is not recognized as an internal or external command, operable program or batch file.
I cannot find how to configure settings JSON to set the path for git.
Below settings didn't work:
{ "git_command": "C:\\Users\\alazt\\developer-folder\\git-folder\\PortableGit\\bin\\git.exe" }
or
{ "terminal": "C:\\Users\\alazt\\developer-folder\\git-folder\\PortableGit\\bin\\git.exe" }
How can I use git commands inside Sublime Text via 'Git' package?
The Git package has its own settings file called Git.sublime-settings
, the default settings file can be seen on the plugin's GitHub page. The plugin does NOT store its settings in Preferences.sublime-settings
.
Save the settings file below in your Sublime Text Packages User directory as Git.sublime-settings
, based on your comment the path to it should be:
..\Sublime Text Build 3211 x64\Data\Packages\User\Git.sublime-settings
{
"git_command": "C:\\Users\\alazt\\developer-folder\\git-folder\\PortableGit\\bin\\git.exe"
}
The example Windows path given by the plugin is "C:\bin\git.exe"
which uses single slashes \
but, as you have already shown, double slashes \\
are likely to be needed. However if the path fails try replacing the double slashes with single slashes.
Please note that there is no terminal
command shown in the plugin's Git.sublime-settings file.