Git command could not be found. Please create an alias or add it to your PATH [duplicate]
Asked Answered
A

2

30

After updating github, I am getting these 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 am trying any commands, I get error messages.

After searching, I found other people are facing similar problem. Here is the link. But they are suggesting to re-install github.

Is there any other solution expect re-installing github?

Acetabulum answered 9/7, 2013 at 6:22 Comment(1)
I'm having a similar problem: "Maybe git-rebase is broken": "https://mcmap.net/q/472339/-39-maybe-git-rebase-is-broken-39"Diamonddiamondback
C
74

Short version

To fix it

  • close Git Shell
  • open GitHub and let it do some post installation.
  • Open Git Shell again and you should be fixed.

Long version

Just to make sure I follow you, you just did this

  • Open Git Shell
  • You are prompted to update GitHub
  • After the update, Git Shell opens

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

  • Close Git Shell
  • Now open the GitHub application (not Git Shell).

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.

Collator answered 25/7, 2013 at 3:45 Comment(1)
Awesome. Just opened the GitHub and got the message of GitHub is extracting git.. Later open the git shell, problem solved.Croatia
F
3

I guess you could try to add git to your path.

Go to Start -> Right click My Computer -> Properties

Go to Advanced system settings

Press Environment Variables...

Find Path and press Edit

Enter ";PATH to git.exe file" at the end of the path.

Reboot

Filiform answered 9/7, 2013 at 6:27 Comment(1)
I did the same, and it worked!! thnksRivarivage

© 2022 - 2024 — McMap. All rights reserved.