The cursor blinked. You typed git rebase, but the branch name refused to appear.
Git rebase tab completion is a small detail that can save minutes every day. With complex histories, dozens of active branches, and frequent rebasing, manual typing wastes focus. Tab completion turns branch selection into a single keystroke, reducing typos and cognitive load.
Most shells support Git auto-completion. Bash and Zsh are the most common. For Bash, install the official git-completion.bash script from the Git project. Place it in ~/.git-completion.bash and source it in your ~/.bashrc:
source ~/.git-completion.bash
For Zsh, enable autoload -Uz compinit && compinit in .zshrc and use git completion from a package manager like Homebrew:
brew install git
Homebrew installs share/git-core/contrib/completion/git-completion.zsh. Source it in your .zshrc: