首先确定目录是否一致。
目录一致时,将一下代码存成xxx.reg格式的文件,双击执行即可。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\open in Git]
@="Git Bash Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\open in Git]
"Icon"="C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\open in Git\command]
@="\"C:\\Program Files\\Git\\bin\\bash.exe\" --login -i"
[HKEY_CLASSES_ROOT\Directory\Background\shell\GIT GUI]
@="GIT GUI here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\GIT GUI]
"Icon"="C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\GIT GUI\command]
@="C:\\Program Files\\Git\\cmd\\git-gui.exe"