Git command could not be found. Please create an alias or add it to your PATH

This question already has an answer here:

  • git command could not be found and could not find ssh-agent

    9 answers

  • How to branch from n-4 commits, and set n-4 as master?
  • Suddenly getting “No supported authentication methods available” when pushing to github
  • How to work simultaneously on several different versions of files with git?
  • Heroku automatic push to github with submodules
  • Submodule commit object 'Not a valid object name' when using 'git cat-file -p'
  • Git and branches
  • Search all of Git history for a string?
  • Get commit list between tags in git
  • What's the meaning of `()` in git command SYNOPSIS?
  • Create a branch in a repo without cloning
  • git fetch - bash.exe: warning: could not find /tmp, please create
  • Imposing a Partial Ordering on Git Commit IDs
  • 2 Solutions collect form web for “Git command could not be found. Please create an alias or add it to your PATH”

    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.

    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

    Git Baby is a git and github fan, let's start git clone.