Unable to modify git bash Windows shortcut
bash, git, windows-7
Solution
2020 Update
KVN posted an update for Windows 10
This one seems to be simplier and works well for me on the latest Git.
- Right-click C:\Program Files\Git\git-bash.exe (Git for Windows)
- Click Properties
- Click the Compatibility tab in the Properties dialog
- Check the "Run This Program As An Administrator" check box
- Click OK button
Older
If you run git bash as administrator by right clicking on its icon and selecting "Run As Administrator" you will be able to change your settings and have them persist.
You can verify this by closing the admin session then reopening as a normal user.
I did this to set the defaults then just used git as a normal user from then on.
Edit: My answer is outdated if you're using the most recent msysgit version and sebastien.b posted the updated solution with - https://stackoverflow.com/a/7216120/104783
It states
The fix is to edit the `Git Bash.vbs` script and have it execute the link again, instead of sh.exe. Look for this line:
Dim bash : bash = fso.BuildPath(gitdir, "bin\sh.exe")
and replace it with this line:
Dim bash : bash = fso.BuildPath(gitdir, "Git Bash.lnk")
andrej351 also has a good reminder
Also, don't forget to select "Defaults" instead of "Properties" from the drop down menu in order to have the settings persisted
Problem
Under Windows 7 I'd like to change the settings for the Git Bash Here shell extension command window, e.g. width, height and font. But when I do this, I get an error "Unable to modify the shortcut". I can modify the shortcut for Git Bash in the Start menu by using "Run as administrator..." This works, but only for Bash windows opened from the Start menu. It doesn't work for the "Git Bash Here" shell extension and there's no "Run as administrator..." option on right-click context menu. How do you do it?