新增「Git Bash Here」到右鍵選單

2022-01-11 06:19:07 字數 694 閱讀 4469

之前安裝了git的時候,清晰的記得右鍵選單裡是有「git bash here」這個選項的,非常方面。後來不知道為啥突然沒有了,就像搞回來。

開啟登錄檔,定位到hkey_classes_root\directory\background\shell(如果background下面沒有shell目錄,就自己新建乙個)。

在shell下右鍵-新建項,其名稱為「git」,此為右鍵選單顯示名稱(在該項的預設值中填上「git bash here」,也能在右鍵選單顯示出來「git bash here」)。

在shell下右鍵-新建-字串,命名為icon,雙擊編輯,其值為「git安裝目錄\mingw64\share\git\git-for-windows.ico」。此為選單加圖示。

在git bash here下右鍵-新建-項,命名為command,其值為」git安裝目錄\git-bash.exe」。

此時,在任何乙個目錄空白處右鍵,即可出現git bash here選項,單擊即可進入bash並在bash中自動進入當前目錄。

考慮到powershell右鍵選項需要按住shift才會在右鍵選單中顯示出來,想把git bash here也搞成這樣子。

只需這樣操作:(未驗證)

在git bash here 下右鍵-> 新建字串,命名為「extended」(與icon欄位同級)即可。

新增Git Bash Here到右鍵選單

步驟 1 通過在 執行 中輸入 regedit 開啟登錄檔。2 找到 hkey classes root directory background 3 在 background 下如果沒有 shell 則右鍵 新建項 shell 4 在 shell 下右鍵 新建項 open in git 其值為 g...

新增「Git Bash Here」到右鍵選單

1.按鍵盤上的組合鍵 win r 把執行調出來 2.在執行中輸入 regedit 再點選確定。3.定位到hkey classes root directory background shell 如果background下面沒有shell目錄,就自己新建乙個 4.右鍵點選shell,選擇新建,然後選擇...

右鍵 新增Git Bash Here選單

步驟 1 通過在 執行 中輸入 regedit 開啟登錄檔。2 找到 hkey classes root directory background 3 在 background 下如果沒有 shell 則右鍵 新建項 shell 4 在 shell 下右鍵 新建項 open in git 其值為 g...