Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Install Bash git completion

davidrea edited this page · 21 revisions

git-flow completion requires git-completion to work. How exactly you go about installing git-completion varies wildly from system to system, so it's hard to give exact installation instructions.

OS X

By far the easiest way to install both Git and git-completion is via Homebrew, so you should pick that one.

Homebrew

  1. Install homebrew
  2. Install Git and bash-completion: brew install git bash-completion
  3. Add bash-completion to your .bash_profile:

    if [ -f `brew --prefix`/etc/bash_completion ]; then
      . `brew --prefix`/etc/bash_completion
    fi
    

MacPorts

If you're using MacPorts, then you will need to install git-core with the +bash_completion option

sudo port install git-core +bash_completion

And add the following to your ~/.bash_profile or ~/.profile

if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi

Ubuntu

  1. Install Git and bash-completion: sudo apt-get install git bash-completion
  2. I don't think you need to do anything else.

Windows with msysgit

  1. Download and place git-flow-completion.bash in home directory (~/ in msysgit shell)
  2. Add a .bashrc file to your home directory with the following line (or add this line to existing .bashrc file):

    source ~/git-flow-completion.bash

Something went wrong with that request. Please try again.