Autocomplete branch name in Intellij's GIT terminal on Windows 10

Viewed 3263

Is it possible to use the autocomplete option for local branch names in the IntelliJ GIT terminal? I can use the autocomplete for GIT commands, but can't find a way to the same for branches.

For example, I would like to enter git checkout RS-1 + TAB (assuming branch name is RS-1-new-feature) to autocomplete or to show list of possible options for autocompletion.

My environment: Windows 10, IntelliJ IDEA 2019.3 Ultimate, GIT 2.25.1.windows.1

IntelliJ setup:

Path to GIT executable: C:\Program Files\Git\cmd\git.exe

Setting>Tools>Terminal>Shell path: cmd.exe

2 Answers

IntelliJ IDEA Terminal just runs the shell that you've configured, it doesn't provide any additional features or completion to this shell.

If the shell you are using supports branch names completion, it will work in the Terminal tool window as well.

http://dahlbyk.github.io/posh-git/ may be an option if you change the shell to PowerShell executable.

You are currently using cmd. You can change your default IntelliJ terminal to Bash, to get all the autocomplete features of git bash terminal. Follow this steps.

File -> Settings -> Tools -> Terminal -> Shell path

In the Shell path enter a path to your git bash executable. For me its on C:\Users\AVENDESTA\AppData\Local\Programs\Git\bin\bash.exe

Related