Git安装后右键没有git bash的解决方案
发布于 2023-06-06 16:06 DEV
实现原理是使用注册表将 git bash 写入右键 1.将以下内容写入新建的.txt 文件。 2.修改.txt 为.reg。 3.双击点击运行。
12345678910111213141516171819202122232425262728293031
Windows Registry Editor Version 5.00; Open files; Default Git-Bash Location C:\Program Files\Git\git-bash.exe[HKEY_CLASSES_ROOT\*\shell\Open Git Bash]@="Open Git Bash""Icon"="C:\\Program Files\\Git\\git-bash.exe"[HKEY_CLASSES_ROOT\*\shell\Open Git Bash\command]@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""; This will make it appear when you right click ON a folder; The "Icon" line can be removed if you don't want the icon to appear[HKEY_CLASSES_ROOT\Directory\shell\bash]@="Open Git Bash""Icon"="C:\\Program Files\\Git\\git-bash.exe"[HKEY_CLASSES_ROOT\Directory\shell\bash\command]@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""; This will make it appear when you right click INSIDE a folder; The "Icon" line can be removed if you don't want the icon to appear[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]@="Open Git Bash""Icon"="C:\\Program Files\\Git\\git-bash.exe"[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
上一篇: Spotify歌词翻译实现