rbrtl
rbrtl

Reputation: 791

IntelliJ Git Integration - git --version empty output

I am currently trying to use the Git integration for IntelliJ 2016.2, but whenever I point it to the executable I get the following issue:

Git Version output problem

This doesn't technically prevent the integration from working but it does cause issues updating the index etc.

I'm running Windows 7, with a completely fresh install, but I had the same issue on the previous PC (these are work machines with various irritating levels of security) but I have colleagues with the same kit that have no such issues.

EDIT

I should have mentioned that it works fine on the command line:

Git Command Line Output

I'm sure I've read something about a change in the way this works internally that means when it's called by an outside executable the output gets screwed up, but I can't find the reference again.

Upvotes: 19

Views: 17014

Answers (4)

saigopi.me
saigopi.me

Reputation: 14938

first get your git.exe path by using command. type this in cmd terminal

git --info-path

then find location your_directory\Git\bin\git.exe mine was C:\Users\saigopi\AppData\Local\Programs\Git\bin

add this path in android studio

File->Settings-> Version Control -> Git

add your path at Path to Git Executable and test it

Upvotes: 3

nogmos
nogmos

Reputation: 909

Happened to me the exact same thing.

git is working from the command line but the path:

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

and the path (as the say here):

C:\Program Files\Git\cmd\git.exe

(which is the path I got when I did where git.exe in cmd)

didn't work.

So I went to git-bash and did where git.exe, and I got a different path, which is working.

enter image description here

Hope it helps

Upvotes: 9

user8208587
user8208587

Reputation: 189

Make sure you set the right path to Git executable: IntelliJ > Settings > Version Control > Git should be C:/.../Git/bin/git.exe

Do not set git-bash.exe or git-cmd.exe

Upvotes: 18

phill.tomlinson
phill.tomlinson

Reputation: 1086

I had the same issue and tried a number of things. It eventually began working again when I downgraded my git install.

Upvotes: 0

Related Questions