将以下内容剪切并粘贴到文件中(比如 install.reg)并双击它。
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui] @="Git &GUI Here"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui\command] @="\"D:\PortableApps\Git\bin\wish.exe\" \"D:\PortableApps\Git\libexec\git-core\git -gui\" \"--工作目录\" \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell] @="Git Ba&sh Here"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell\command] @="wscript \"D:\PortableApps\Git\Git Bash.vbs\" \"%1\""
使用以下目标创建一个名为 Git Bash.lnk 的快捷方式:
C:\WINDOWS\system32\cmd.exe /c ""D:\PortableApps\Git\bin\sh.exe" --login -i"
您的便携式 Git 现在已在 Windows shell 中注册。