Git.exe appeared unexpectedly on Windows

My machine uses Window 8 x64. I installed Git on my Windows, everything works fine. I configured the "Path to Git executable" parameter of my IDE (PhpStorm IDE) in Git exe which can be found by the following answer

Where is git exe located

Here is the location where git.exe is located on my computer C: \ Users [computer_name] \ AppData \ Local \ GitHub \

But today I received a message from my IDE: Cannot start Git: git.cmd. Probably the path to the Git executable is invalid. Fix it. (show balloon)

I checked both git.exe or git.cmd, they disappeared, I don’t know why. I tried to reuse the GitHubSetup that I used to install to repair or reinstall, but the GitHub application was still open, because it seemed like there was never a problem with myself. Github runs on my machine, I see my repository, commit, etc. But I would like git.exe to be configured for my IDE.

How can I return this missing file (git.exe)?

+4
source share
4 answers

If Git is still accessible from the command line, then the binary still exists. Did you try to find it when searching (using bash you could use $ which git to tell you the location. Don't know the equivalent for the Windows command line)? When you find it, you can try copying it to the right place for your development environment.

+6
source

Since Git has several installation options, I would like to point out that this solution is not for everyone.

This solution is for the following case:

  • OS: Windows 8 (not applicable for any other version)
  • Git installs as a command line tool
  • Git is installed at the default location

Git executable executable file (sh.exe) for the command line tool is a script that will be based on the Windows command line (cmd.exe) for operation

You will need the following line to properly access Git as an executable:

 C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i" 
+2
source

Best solution and it will definitely work

  • Open the GitHub app and go to setup
  • Sign in to the GitHub desktop app.
  • Then click on the open debug log
  • Locate git.exe in this txt file, and then you will find out the current path that is used with the GitHub Desktop application.
+2
source

I had the same problem.

I decided to reinstall git and pointed the path to the git executable in PHPStorm to the installed git path.

Click here to download git

for git: YourInstalledFolder \ Git \ bin \ git.exe

I saw that the default path of PHPStorm git is git.exe. This means that you may have a better chance if you install git in the same directory where PHPStorm is installed.

+1
source

Source: https://habr.com/ru/post/1493607/


All Articles