Setup git in Intellij terminal

WindowsGitIntellij Idea

Windows Problem Overview


I want to use git in Intellij Terminal but it does not recognize the command. In Command Prompt and Windows power shell the command in recognized (I added the git path in System Environment Variables). I am also aware that Intellij has an GUI integration with Git.

So, can anyone tell me how can I use the git command in the Intellij terminal.

Windows Solutions


Solution 1 - Windows

Setup JetBrains(InteliJ, WebStorm, PHPStorm) IDE terminal to use GIT bash

  • File
  • Settings
  • (Enter 'Terminal' in search)
  • Change Shell path to:
"C:\Program Files\Git\bin\sh.exe" --login -i

or

"C:\Program Files\Git\bin\bash.exe"

If you have another directory for installed git change it respectively.

Solution 2 - Windows

The full path is not needed anymore (windows), I just replaced cmd.exe to sh.exe and bingo was his name O

Settings > Tools > Terminal > Shell path > sh.exe

Solution 3 - Windows

You don't need to reinstall anything. Go to:

  • File
  • Settings
  • Search for terminal
  • in shell path type: "C:\Program Files\Git\bin\sh.exe" --login -i (or another directory where you installed Git)

Solution 4 - Windows

In the IDEA settings make sure that your terminal path leads to "usr/bin" instead of "/bin".

IDEA terminal settings tab

As a result you will see pretty rich console output:

Result console output

Solution 5 - Windows

For me, it works also but only the path of Git Bash has changed in Windows :

"C:\Users\REPLACE_THIS_BY_YOUR_USER\AppData\Local\Programs\Git\bin\sh.exe" --login -i

Solution 6 - Windows

This worked for me:

IntelliJ: File->Settings->Version Control->Git:

On the right side, Path to Git executable:

"C:\Program Files\Git\bin\git.exe"

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2302448View Question on Stackoverflow
Solution 1 - WindowsAleksej ShovgenjaView Answer on Stackoverflow
Solution 2 - WindowsAlvicView Answer on Stackoverflow
Solution 3 - WindowsDaniel CzajkaView Answer on Stackoverflow
Solution 4 - WindowsOrachigamiView Answer on Stackoverflow
Solution 5 - WindowsjpmottinView Answer on Stackoverflow
Solution 6 - WindowsSiamakView Answer on Stackoverflow