OS X - Can't start Git: /usr/bin/git Probably the path to Git executable is not valid

Solution 1:

You should run sudo git --version on your command line. It will ask you to agree to the git xcode license agreement, once done everything will work as before.

Solution 2:

When upgrading to MacOS Sierra I had to run: xcode-select --install

Solution 3:

You should agree explicitly to user's licence agreement.

This is how you should do it:

  1. Open terminal
  2. run the following command: sudo xcodebuild -license
  3. agree to the terms.

That's it! :)

Solution 4:

I got this problem too, because I uninstalled my Xcode.

I solved it with these steps:

  1. Type xcode-select --install in the terminal (Installs the license)

  2. Download a git and re-install it

After this 2 steps, I can use git commands in the terminal like git or git --version.

But when I open the android studio, it still show the error

so we need another two steps:

  1. Type which git in your terminal (find out the git path)

  2. Configure the path (you got in the step 3) in your android studio , then apply

Just like below pic enter image description here

It works for me.

Solution 5:

use "which git" in terminal. It will provide you your git location. like "/usr/local/bin/git" paste this location in popup which came after clicking "Fix it". Then click apply.