Skip to content

Instantly share code, notes, and snippets.

@christianscott
Created January 8, 2019 03:23
Show Gist options
  • Save christianscott/eed058ef31bf6b50be706a3ed896013b to your computer and use it in GitHub Desktop.
Save christianscott/eed058ef31bf6b50be706a3ed896013b to your computer and use it in GitHub Desktop.
Fuzzy-find a branch and checkout to it
function fzf-checkout
git checkout (git branch | rg '^\s*[^*]' | fzf | sed 's/^ *//;s/ *$//')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment