Search code examples
windows-10git-bashtaskbar

GitBash duplicate taskbar icon


I've just re-installed Git on my Win10 PC and tried to pin Git Bash to my taskbar.

For some reason now, when I open Bash from my taskbar shortcut, it displays duplicate icon on the taskbar. I tried to pin that icon but once I end the terminal session, that shortcut is deleted. I've tried multiple Win10 sites but most just say to repin the new icon.

Prior to updating I could pin it fine with no issues.


Solution

  • Pinning the git-bash.exe fixed the problem for me. This also fixed the problem with broken icon graphic.

    NOTE! This was on Windows 7 - haven't tested on Win10!

    1. Open Windows Explorer.
    2. Navigate to C:\Program Files\Git.
    3. Right click git-bash.exe, select Pin to Taskbar.
    4. Shift-right click the newly pinned icon, select Properties.
    5. Add to the end of the field Target: --cd-to-home
    6. Set the value of the field Start in: %HOMEDRIVE%%HOMEPATH%
    7. Press OK.

    Git Bash Properties