Reputation: 1275
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.
Upvotes: 127
Views: 148366
Reputation: 336
In my case, the Git Bash through IntelliJ had TERM=xterm-256color. Regular Git Bash had TERM=xterm
To fix the garbled characters issue in IntelliJ Idea,
Go to "File | Settings | Tools | Terminal"
Environment Variables: TERM=cygwin
In IntelliJ Terminal, Shell Path I was using was already:
C:\Users\<userId>\programs\Git\bin\bash.exe --login -i
Upvotes: 2
Reputation: 3027
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
Upvotes: 7
Reputation: 706
In the IDEA settings make sure that your terminal path leads to "usr/bin" instead of "/bin".
As a result you will see pretty rich console output:
Upvotes: 4
Reputation: 39
You don't need to reinstall anything. Go to:
"C:\Program Files\Git\bin\sh.exe" --login -i
(or another directory where you installed Git)Upvotes: 1
Reputation: 49
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
Upvotes: 2
Reputation: 3702
Setup JetBrains(InteliJ, WebStorm, PHPStorm) IDE terminal to use GIT bash
"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.
Upvotes: 327
Reputation: 25
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"
Upvotes: -2