Skip to content

Instantly share code, notes, and snippets.

@salkin-mada
Last active February 28, 2021 14:05
Show Gist options
  • Save salkin-mada/8573f4471732113441f32b869a069177 to your computer and use it in GitHub Desktop.
Save salkin-mada/8573f4471732113441f32b869a069177 to your computer and use it in GitHub Desktop.
fuzzy git branch switcher
function gbs() { sk --ansi -c 'git branch' --preview 'git branch --all' --bind 'enter:execute[git switch $(echo {} | sed "s/ //g" | sed "s/*//g")]+abort' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment