Fuzzily Checkout a branch

Install fzf:

Install dependency

$ brew install fzf

Add to your shell startup file: .zshrc or .bashrc:

checkout() {
  git checkout $(git branch --format '%(refname:short)' | fzf --layout=reverse)
}

Restart your shell, in a git repository, type checkout :)