Reputation: 791
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:
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:
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
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
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.
Hope it helps
Upvotes: 9
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
Reputation: 1086
I had the same issue and tried a number of things. It eventually began working again when I downgraded my git install.
Download an older version from here: https://github.com/git-for-windows/git/tags I used this specific version: https://github.com/git-for-windows/git/releases/tag/v2.8.4.windows.1
Reload Intellij. Git should now work.
Upvotes: 0