Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The shortcut icon to Git Bash is correct. However when I run and open the shell, the shell window icon is that of exe files. This is disturbing while alt-tabbing.

It is working correctly on windows XP.

cmd.exe on win7 has its own icon (not the exe icon), so I believe that what I want to achieve is doable.

How can I make sure that the window icon gets the Git icon?

share|improve this question
Can you mention which EXE is being targeted by the shortcut? Have you tried creating a new shortcut to that EXE (say, on the Desktop) and changing its icon? Does the icon persist then? – Karan Mar 7 '13 at 1:58
The target is "C:\Program Files (x86)\Git\bin\sh.exe" --login -i. I created a new shortcut "sh" in the same location as the "Git Bash" shortcut (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git), and it is working! I diffed the files and they do differ, but not visibly in links' properties dialog. The problem is solved, thank you, but I don't understand why the icon was broken in the first place. – Gauthier Mar 7 '13 at 8:35
I added the solution as an answer below, with some theories. Can't say 100% for sure though what is responsible. – Karan Mar 7 '13 at 18:37
up vote 1 down vote accepted

I don't know why this sort of thing happens sometimes (perhaps the icon cache doesn't get updated properly or is corrupted), but in general either rebuilding the icon cache or recreating the shortcut with the custom icon does the trick.

share|improve this answer
I did not try to rebuild the icon cache, but creating a new shortcut by myself did the trick. – Gauthier Mar 11 '13 at 6:52

I had the same issue, linking an icon from a folder without whitespace in it did a trick (I had Git installed to C:\Program Files (x86) which has whitespace in it). Simply copy the icon somewhere else, e.g. C:\icons.

share|improve this answer
+1 FWIW, I first tried the accepted answer, which didn't work for me. I then tried this, and it worked. I then changed back to the original icon location, and it still works - even after a reboot. Go figure. – Mark Seemann Jun 26 '13 at 11:52
Yeah I've had the same, it's weird. I've opened an issue on github, but then I was unable to reproduce it anymore. – jakub.g Jun 26 '13 at 14:19
Worked for me as well! – Rastapopulous Nov 2 '13 at 15:14

I've changed the icon location from



C:\Program Files (x86)\Git\etc\git.ico

which, upon reopening the dialog, Windows replaced with

%ProgramFiles% (x86)\Git\etc\git.ico

. This resolved the issue for me. These paths refer to the same location but somehow the first is broken while the second and third work.

So it seems there's some whitespace-issues going on but it's not spaces in the directory name itself that's the problem.

Yes, this answer builds on jakub.g's answer.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .