Skip to content

Instantly share code, notes, and snippets.

@thepacketgeek
Created January 6, 2022 18:20
Show Gist options
  • Save thepacketgeek/73097d691cb58269cda88011c873a8c9 to your computer and use it in GitHub Desktop.
Save thepacketgeek/73097d691cb58269cda88011c873a8c9 to your computer and use it in GitHub Desktop.
Git checkout branch w/ fzf
gch() {
git checkout $(git for-each-ref refs/heads/ --format='%(refname:short)' | fzf)
}
gchr() {
git checkout --track $(git branch --remotes | fzf)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment