I'm trying to get the Git Shell (from GitHub) to appear as a search result in the Windows 10 search bar. It shows up under "All Apps" and I can even pin it to the menu, but it won't appear in search. The Git Shell shortcut itself launches the powershell with some specific arguments, so it's not a normal .exe, presumably why Windows is ignoring it. Any idea how to fix this? It may seem like a small thing, but I open most of my apps through search, and it keeps throwing me off.
I had this same problem. I ended up solving it in two steps:
- Create a batch file which launches Git Shell.
- Make a shortcut for the batch file, and add the shortcut to the Start Menu
Batch file to launch Git Shell
My batch file launcher is named
@echo off set GH_APP=%LOCALAPPDATA%\GitHub\GitHub.appref-ms set GH_OPT=--open-shell if exist "%GH_APP%" goto :haveapp echo "%GH_APP%" not found goto :eof :haveapp start "dummy" /b "%GH_APP%" %GH_OPT% :eof set GH_APP= set GH_OPT=
I put it in my
~\bin folder (which I added to my PATH), but this isn't critical. You just need a file that you can make a shortcut to.
Create a shortcut and add it to the Start Menu
- Find the
posh-git.batfile in a File Explorer window.
- Right-click the batch file. Choose "Create Shortcut"
- Rename the new shortcut. I recommend naming it Git Shell
- Add the shortcut to your Start Menu.
For me, the GitHub desktop app already has a link at
%APPDATA%\Microsoft\Windows\Start Menu\Programs\GitHub, Inc
so I added my new Git Shell shortcut into that same folder.
Now I can open the start menu and type "git shell", and the search finds my start menu program and allows me to launch it.