Showing git branch in ConEMU

Is there a way to show the branch in git somewhere visually (background or similiar) in ConEmu?

  • ConEmu with Git Bash delete key won't work
  • How to make ConEmu execute .sh in the same window with Git for Windows?
  • Can't start Git Bash
  • ConEmu attempts to open and crashes immediately
  • How to pull a specific file with GIT?
  • How to colorify git errors, warnings and fatal messages?
  • Git merge strategy for integrating 'patch' branch into 'minor', 'minor' branch into 'major'
  • Move git HEAD without changing anything else
  • git-svn: keeping git repo and svn repo in sync
  • Apply patches created with git log -p
  • 3 Solutions collect form web for “Showing git branch in ConEMU”

    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.

    Git branch can be visible in plain cmd or Far Manager prompt.

    GIT branch in cmd prompt

    All magic is done with special ANSI sequences (“Inject ConEmuHk” and “ANSI X3.64 …” options must be checked).
    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.

    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.

    Git Baby is a git and github fan, let's start git clone.