17

I have noticed that on Version Control window, in tabs Log and Local changes there is no information. Only following error appears:

Error updating changes: Cannot identify version of git executable C:\Program Files\Git\cmd\git.exe

When I have clicked Test in Settings > Version Control > Git, entered above path in Path to Git executable following window appeared: Link

After typing in CMD command git --version I get output:

git version 2.17.0.windows.1

What is more after writing some code Intellij is not highlighting changes.

I don't have any idea why it is not working... Any ideas?

3
  • 1
    Possible duplicate of How do you make Git work with IntelliJ? Commented Jan 14, 2019 at 16:51
  • Yeah, thank you. After implementing solutions from link you provided issue still exists. But I am almost sure that cause of this error comes from my VDI machine. Commented Jan 14, 2019 at 17:02
  • This started to fail in my windows 10 box today (16/01/2020) C:\>git.exe --version error reading exit code: The handle is invalid. Commented Jan 16, 2020 at 21:50

7 Answers 7

19

I am able to resolve the issue.

My GIT installation directory: C:\installations\Git\

WHAT WORKED

If I point the Git executable path to (C:\installations\Git\mingw64\bin\git.exe) it worked.

enter image description here

WHAT DIDN'T WORKED

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

17

For me, only invalidating caches and restarting intellij worked. :)

2 Comments

Worked for me; thanks! I hadn't made any config changes...my Mac had just forcibly restarted and when it came back up IntelliJ decided I didn't have git installed anymore, even though I was successfully using git from the cmd line.
This solution did work for me today, 3 years later. I didn't do anything special, it seemed like intellj just got confused. I want to add that I only selected the option about "VCS clearing caches" since I was messing with git remotes
8

What worked for me in Mac osx

~ ⌚ 8:00:57
$ which git   
/Users/shashwat/.aw/pex_resources/scripts/binaries/git

Ans setting the path in Intellij enter image description here

Comments

4
  1. go to the terminal and type git --exec-path to get your git path.
  2. then go to IntelliJ and configure it, Click browse and select your git path.
  3. select git and hit test.

Note: on Mac Os, use / in finder to navigate easier.

Comments

2

For some reason, IntelliJ cannot get any output from the command line client. Something similar is reported - https://youtrack.jetbrains.com/issue/IDEA-82445

It might be caused by antivirus software or UAC.

Comments

1

i got the same problem, and the config is right,

git works just when i cut down the internet, it got from the IT part in my company.

Comments

0

For me it seemed to be a resolution issue in the way Windows handles specific folder:

In the german Version "C:\Programme\..." and "C:\Program Files\..." are mapped to the same directory, but he latter just didnt work. It actually picked the correct the correct path when opening the directory menu on the exe path but just said git is not installed afterwards. I had to change it manually to the first.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.