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.
go to the terminal and type git --exec-path to get your git path. then go to IntelliJ and configure it, Click browse and select your git path. select git and hit test.
From the main menu, choose VCS | Update Project or press Ctrl+T . The Update Project dialog opens. Select the update type (this strategy will be applied to all roots that are under Git version control): Merge the incoming changes into the current branch: select this option to perform merge during the update.
One way to open the Git tool window is to hover over the quick access button in the bottom left of the IntelliJ IDEA window, and select Git. This will open the Git Log tool window. Alternatively, you can use ⌘9 (macOS), or Alt+9 (Windows/Linux), to open the Git Log tool window.
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
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With