0

On Windows, when I try to perform an interactive rebase, IntelliJ IDEA fails with the following error:

cannot spawn sh: No such file or directory unable to start editor '"V:/tools/IntelliJ IDEA 2019.3.3/jbr/bin/java" -cp "V:/tools/IntelliJ IDEA 2019.3.3/plugins/git4idea/lib/git4idea-rt.jar;V:/tools/IntelliJ IDEA 2019.3.3/lib/xmlrpc-2.0.1.jar;V:/tools/IntelliJ IDEA 2019.3.3/lib/commons-codec-1.13.jar" git4idea.rebase.GitRebaseEditorMain 63342'

Most of the other git operations work.

I tried reinstalling Git for Windows, and IntelliJ, among other things.

Strangely, I noticed that the interactive rebase works on Jetbrains Rider.

How can I fix this?

Hay
  • 2,246
  • 20
  • 30

1 Answers1

1

There are multiple git.exe executables within Git for Windows. The selected one in the settings may not be the correct one.

In the Settings | Version Control | Git configuration, check the path to the Git executable.

It must not be Git\mingw64\bin\git.exe.

Instead, use Git\cmd\git.exe.

Hay
  • 2,246
  • 20
  • 30