0

I have a custom git command (specifically git-tfs - I don't want to install via chocolatey) I would like have this custom command in separate folder (C:\Program Files (x86)\Git\extensions\GitTfs). I know that I can just add this folder to the system path, but I want to isolate the git settings to the git folder.

I have tried to set the git --exec-path:

git --exec-path="c:\Program Files (x86)\Git/libexec/git-core;c:\Program Files (x86)\Git/extensions/GitTfs"

and

git --exec-path="/c/Program Files (x86)/Git/libexec/git-core:/c/Program Files (x86)/Git/extensions/GitTfs"

But I get: usage: git.....

Can I add more than one folder as git --exec-path? (or have my custom git command in a separate folder in any other way.)

steenhulthin
  • 4,553
  • 5
  • 33
  • 52

2 Answers2

1

I think you can only specify one directory. You might be able to use an alias instead (untested):

git config --global alias.tfs '!c:\Program Files (x86)\Git/extensions/GitTfs/git-tfs'
chepner
  • 497,756
  • 71
  • 530
  • 681
0

@chepner's answer is conceptually correct, but the path must be to the executable file. So the correct syntax is:

git config --global alias.tfs !'C:\Program Files (x86)\Git\extensions\GitTfs\git-tfs.exe'
steenhulthin
  • 4,553
  • 5
  • 33
  • 52