I was on GitHub today and realized I was behind on updates from a repo. I tried to fetch updates, but it failed from the outset. I received two messages when I started up Git Shell (from GitHub for Windows):
Warning: git command could not be found. Please create an alias or add it to your PATH.
Warning: Could not find ssh-agent.
When I attempted to enter "$ git fetch origin", I got the following error message:
The term '$' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I also tried omitting the $ sign, but that didn't change anything.
I have no clue what's going on, the last time I used the Shell (beginning of this month), it did not do this. I have tried adding the path to git.exe to the PATH environment variable, but that did not work - nothing appeared to change. I have not restarted my computer after doing so, is that the problem? I have also never set up Git to use SSH.
It sounds like you recently updated GitHub application and Git Shell is now broken.
Short version
To fix it
Long version
This just happened to me and just to make sure I follow you, you just did this
Now it gives the error
git command could not be found. Please create an alias or add it to your PATH.
Warning: Could not find ssh-agent.
If this is the case, do this
This will say something along the lines of (not sure of the exact version)
GitHub is extracting git..
Let that go through the process and after it is complete, go open Git Shell and it is fixed. Just worked for me at least.