79 words
1 minute
How to add git bash to Windows context menu
@echo off:: Check adminnet session >nul 2>&1if %errorLevel% == 0 ( echo Running as admin) else ( echo Requesting for admin powershell -Command "Start-Process '%~f0' -Verb runAs" exit /b)
set "key=HKEY_CLASSES_ROOT\Directory\Background\shell\Git Bash Here"set "icon=C:\Program Files\Git\mingw64\share\git\git-for-windows.ico"set "command=C:\Program Files\Git\bin\bash.exe --login -i"
reg add "%key%" /ve /d "Git Bash Here" /freg add "%key%" /v "Icon" /d "%icon%" /freg add "%key%\command" /ve /d "%command%" /f
echo Git Bash Here context menu added successfully.pause How to add git bash to Windows context menu
https://blog.spr-aachen.com/posts/tutorial-git/addtocontextmenu/ Some information may be outdated