Problem
When attempting to edit a commit message in the IDE, an error message appears stating:
C:\Users\<username>\AppData\Local\JetBrains\IntelliJIdea2025.1\tmp\intellij-git-editor-local.sh: command not found
A similar issue occurs on the console when running: git rebase -i
Cause
The error occurs because Windows doesn’t recognize .sh scripts natively as executable commands, given that such scripts are intended for Unix-like environments. Although the script file exists at the specified location, the Windows shell does not execute it due to system constraints.
Resolution
Git executable from Cygwin was used:
C:\cygwin64\bin>git -v
git version 2.45.1
Change the path in the IDE (Settings (⌘ + , or Ctrl + Alt + S) > Version Control > Git > Path to Git executable) to the relevant git installation for Windows (e.g. git version 2.47.1.windows.2).
C:\>where git.exe
C:\Program Files\Git\cmd\git.exe
Comments
0 comments
Please sign in to leave a comment.