I'm using IntelliJ on my MacBook and get this message every time I open the app. I already checked the Preferences > Version Control > Git under "Path to Git executable" and set this path to the path that is shown in my terminal for whereis git
. Also, testing the path in the IntelliJ settings returns a "Git version is 2.30.1". What else can I do to fix this problem?

- 110,530
- 99
- 389
- 494

- 611
- 1
- 5
- 14
-
1Would it be an option for you to use Homebrew git? Could you please install it and change bath to brew Git in IDE settings? There is a chance that you have faced known issue with xcode Git: https://youtrack.jetbrains.com/issue/IDEA-248193 – Ruslan Kuleshov Sep 23 '21 at 09:09
-
@RuslanKuleshov Yes I'm using Homebrew git instead of git in IntelliJ at the moment. The path to brew git is in "whereis git" right? If so, the path in the IDE settings is already set to brew git. – inconnu Sep 23 '21 at 10:41
-
>The path to brew git is in "whereis git" right? Not necessarily, you may not have changed your PATH variable and it may store your xCode git there. path to homebrew git `/usr/local/bin/git` – Ruslan Kuleshov Sep 23 '21 at 11:06
-
@RuslanKuleshov If I set the "Path to Git executable" to `/usr/local/bin/git` and test it in the settings, it says "Git is not installed No such file" – inconnu Sep 23 '21 at 11:11
7 Answers
In my case the issue was solved by invalidating cache and restarting IDE. Simply go to Files -> Invalidate Caches -> Invalidate and Restart.

- 669
- 1
- 4
- 5
-
That worked temporarily for me but next time I restarted my computer I got the error again. – Michael Osofsky Feb 09 '22 at 21:38
-
1
In my case, the IDE seems only be able to recognize the path of git
as /usr/local/bin/git
, but git
is installed at /usr/bin/git
. So I made a softlink between of them.
sudo ln -s /usr/bin/git /usr/local/bin/git
-
1
-
-
1In my case, I changed the Path to Git executable under Preferences > Version Control > Git to /usr/bin/git and it worked. Thanks for giving me an idea as to what the problem was. – Chembe Banda Sep 22 '22 at 07:02
-
Open Preferences > Git
> version control > git > Path to Git executables
:
set to
/usr/local/bin/git
or
/usr/bin/git

- 1,841
- 2
- 24
- 27
For people using windows with wsl2, IntelliJ might automatically detect the correct file, but sometimes is not able to access. Restarting wsl and IntelliJ helped for me:
- Restart wsl
- Open cmd as admin
- run "wsl.exe --shutdown"
- run "wsl.exe"
- Restart intelliJ

- 179
- 5
In my case, I fixed this issue by going to Preferences > Build, Execution, Deployment > Build Tools > Gradle and update Gradle JDK
from 1.8
to 11

- 904
- 6
- 33
Just update/install git with following command:
brew install git
Go to Intellij IDEA (Top left corner) -> Preference -> Version control -> Git -> Enter "/usr/local/bin/git" (generally git is installed in this path to verify it once, you can enter the same in finder) for "Path to git executable"
Boom!! Your Git is back.
Cheers!! :)

- 101
- 9
All of the methods above are not working for me.
First of all, I Invalidate Caches -> Invalidate and Restart. Secondly, I have to run the git command manually. Then it seems trigger something internally to find git path, I guess. Afterwards it is working.

- 1,508
- 2
- 23
- 42