Unable to modify git bash Windows shortcut

netgirlk picture netgirlk · Apr 12, 2010 · Viewed 47k times · Source

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?

Answer

sclarson picture sclarson · Jul 26, 2010

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