Is there a way to show the branch in git somewhere visually (background or similiar) in ConEmu?
-
Background? Similar? Where do you want to see branch? What shell at last? – Maximus Nov 21 '12 at 18:38
5 Answers
Git branch can be visible in plain cmd or Far Manager prompt.
All magic is done with special ANSI sequences ("Inject ConEmuHk" and "ANSI X3.64 ..." options must be checked).
I
Run GitShowBranch /i
to install showing branch, GitShowBranch /u
to uninstall.
Also, you may run your cmd as following (within Task contents or ConEmu's Command line)
cmd /k ver & GitShowBranch /i
PS. File GitShowBranch
exists in ConEmu's distro, but you may see it online.

- 10,751
- 8
- 47
- 65
-
1Is there any way to customize the branch name? By default its the local name plus an elipsis plus the remote name. WAY TOO MUCH! I just want the local branch name. – Kyeotic Jun 19 '14 at 01:24
-
Yes there is a way. Install git bash, then in ConEmu settings, under the "ComSpec" section set the Explicit executable to "C:\Program Files (x86)\Git\bin\sh.exe" --login -i
.
This runs a bash shell session, and gives you a fully resizable window, with the git tab completion and current working branch prompt.

- 39,692
- 27
- 110
- 158

- 2,016
- 14
- 20
-
It's definitely the best way to do it (there is even a topic for that http://superuser.com/questions/454380/git-bash-here-in-conemu) – maQ Nov 09 '16 at 13:54
-
This does nothing. There must be something else that need to be done. – Bruno Santos Jan 15 '18 at 17:56
Disclaimer #1
ConEmu is not a shell, so it does not provide "shell features" like tab-completion, command history and others.
Usually, Git information like branch or amount of changes is displayed in the command line prompt, for example C:\path\to\repository [branch|+2~4-6]>
. This is done by the executing shell, not the console frame.
As far as I know, the standard Windows command prompt (CMD) does not support modifying that. The bash that comes with Git for Windows already supports that perfectly though; and for PowerShell there are numerous extensions for Git, most notably posh-git.

- 369,085
- 72
- 557
- 602
To sum up the situation is:
I know sh.exe
can do this but needed to check if it is in the Git\bin
folder and have access by only writing sh
in command line.
First I saw sh.exe
in Git\bin
folder but wanted to see if I can execute on command line. To see it I checked environment vars using by echo %path%
It was complicated to see if there is. I used powershell script and there is :)
I would have execute sh in command line too :)))
Refrences:
Codes:
echo %path%
($env:Path).split(";") | where ({$_ -like "*Git*"})

- 16,052
- 31
- 116
- 182