Skip to content

Instantly share code, notes, and snippets.

@zph
Created November 5, 2015 06:06
Show Gist options
  • Select an option

  • Save zph/327a550c44a0980694f2 to your computer and use it in GitHub Desktop.

Select an option

Save zph/327a550c44a0980694f2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Requires git and fzf
# Usage gco -> type fuzzily <ENTER> -> VOILA, on branch
SELECTED_BRANCH="$(\git branch --list | tr -d '^[* ]*' | fzf)"
git checkout "${SELECTED_BRANCH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment