Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have found a Tmux configuration file that shows how to add the Git branch to the Tmux status line, however It just shows [[ branch ]] no matter if I am in a Git repo or not. I am not sure if this requires git-completion, but if so I'm not even sure if it is installed as it is a 'virtual' package in Ubuntu (the leading 'v' means 'virtual'):

$ aptitude search git-completion
v   git-completion

$ sudo apt-get install git-completion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'git' instead of 'git-completion'
git is already the newest version.

How might I add the branch and also the git repo name for the CWD to the Tmux status line?


share|improve this question
up vote 4 down vote accepted

I developed a Bash script for doing that: tmux-git.

tmux-git shows the Git branch of the current working directory, and also checks for uncommited and stashed changes.

share|improve this answer
Great, thank you! – dotancohen Oct 7 '13 at 7:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.