如何将 "git status" 命令添加到文件夹的 Windows 资源管理器上下文菜单?
How to add "git status" command to Windows Explorer context menu for folder?
我有 Tortoise Git,但它比调用 "git status" 慢得多。我写了批处理文件:
cd /d %1
git status
pause
exit
根据这个问题How add context menu item to Windows Explorer for folders
我尝试将命令添加为
C:\Windows\System32\cmd.exe /K "C:\BATs\ShowGitStatus.bat %1"
但是我得到 "The file does not have a program associated with it for performing this action. ..." 我做错了什么?
- 添加新的Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus键
注册表
- 添加新的Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus\命令键
- 将最后一个键的默认值改为
C:\BATs\ShowGitStatus.bat %1
- 将问题bat文件中列出的地方放在C:\BATs\文件夹下。将其命名为 ShowGitStatus.bat
这应该有效。
我有 Tortoise Git,但它比调用 "git status" 慢得多。我写了批处理文件:
cd /d %1
git status
pause
exit
根据这个问题How add context menu item to Windows Explorer for folders 我尝试将命令添加为
C:\Windows\System32\cmd.exe /K "C:\BATs\ShowGitStatus.bat %1"
但是我得到 "The file does not have a program associated with it for performing this action. ..." 我做错了什么?
- 添加新的Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus键 注册表
- 添加新的Computer\HKEY_CLASSES_ROOT\Directory\shell\GitStatus\命令键
- 将最后一个键的默认值改为
C:\BATs\ShowGitStatus.bat %1
- 将问题bat文件中列出的地方放在C:\BATs\文件夹下。将其命名为 ShowGitStatus.bat
这应该有效。