HyperionX
HyperionX

Reputation: 1646

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.

Upvotes: 7

Views: 2846

Answers (7)

snydergd
snydergd

Reputation: 564

In my case, launching git-bash.exe and pinning the result produced a shortcut to cmd.exe with no arguments, which just opened a regular command window. Creating a shortcut to git-bash.exe directly (either manually, or by pinning the existing Start Menu shortcut) caused the opened window to be separate from the pinned item.

What worked in my case (more manual):

  1. Create a shortcut to this command: %windir%\system32\cmd.exe /c "C:\Program Files\Git\bin\bash.exe" --login
  2. (Optional) "Change Icon...", then select the git-bash.exe location (one directory up from bash.exe), and click the icon selection area for the icon to show up and to select it.
  3. Update the "Start in" value to %HOMEDRIVE%%HOMEPATH%

Upvotes: 3

KP Singh
KP Singh

Reputation: 394

I have faced this problem. Here is a tried and tested solution. Very easy. Out of the 2 icons that you see, right-click on the inactive icon and do Unpin from taskbar. Then click on the active icon and do Pin to taskbar.

Upvotes: 2

Czipperz
Czipperz

Reputation: 3336

None of the other solutions worked for me so here's what I did on Windows 10:

  1. Open Windows Explorer
  2. Navigate to C:\Program Files\Git
  3. Right click on git-bash.exe
  4. Right click on it and select Pin to Taskbar. This creates the first taskbar item.
  5. Run git bash by clicking on the taskbar item. This creates the second taskbar item.
  6. Pin the second taskbar item.
  7. Open the properties (right click on the icon -> right click on the app name -> properties) of the second taskbar item and fix them:
  8. Set Target to "C:\Program Files\Git\git-bash.exe" --cd-to-home
  9. Set Start in to %HOMEDRIVE%%HOMEPATH%
  10. Change the icon... Go to C:\Program Files\Git\ and select git-bash.exe and the icon.
  11. Close the properties window and unpin the first taskbar item.

Upvotes: 2

Krishna Narayan
Krishna Narayan

Reputation: 31

NOTE! This was on Windows 10 I don't know how it works but open the git-bash.exe file and pin the opened file on the taskbar Do not pin the program which is not opened or else it wont work enter image description here

enter image description here

Upvotes: 3

ksaraiya
ksaraiya

Reputation: 157

I did this for Windows 7:

  1. Make sure there was no other (older) Git Bash appearing in Start Menu
  2. Remove any existing pinned Git Bash from Taskbar
  3. Launch Git Bash
  4. Pin this launched window to Taskbar (instead of the one appearing in Start Menu)

Upvotes: 5

Terry
Terry

Reputation: 1

It's easy for Windows 10.

  1. Open Windows Explorer
  2. Navigate to C:\Program Files\Git
  3. Select git bash
  4. Select the 'Manage' option which appears under the field in purple 'Application Tools'
  5. Select the 'Pin to Taskbar' option which shows on the far left

Upvotes: 0

apa64
apa64

Reputation: 1616

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

Upvotes: 2

Related Questions