1. Open the registry by typing ' regedit ' in ' run '.
2. Find [Hkey_classes_root\directory\background].
3, under [Background] if there is no [shell], then right-new item [Shell].
4. Under [Shell] right-new item [Open in Git], the value is "Git Bash here", this is the right-click menu display Name. (You can create a new item directly from Git Bash here)
5. Under [Shell] right-new-string value [Icon], double-click Edit, its value is "D:\Tools\VersonCtrs\Git\Git\mingw64\share\git\git-for-windows.ico". This is the menu plus icon.
6. Right-new-item [command] under [Open in Git], the value is "D:\Tools\VersonCtrs\Git\Git\bin\bash.exe"--login-i.
7. reg file export, including delete and Add.
5.00 [Hkey_classes_root\directory\background\shell\git Hash here] " Icon "="C:\\Program Files\\git\\mingw64\\share\\git\\git-for-windows.ico"@ ="Git hashhere"[hkey_classes_root\directory\background\shell\git Hash here\command]@="\" C:\\Program files\\git\\bin\\bash.exe\ "--login-i"
Delete
5.00 [-hkey_classes_root\directory\background\shell\git Hash here]
Reference:
https://www.zhihu.com/question/48091139/answer/109144599
Http://www.bubuko.com/infodetail-1263581.html
Http://www.cnblogs.com/JoshuaDreaming/archive/2011/12/01/2270254.html
Win10 add git Hash to the right-click menu here