Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Created September 26, 2019 02:14
fbr() {
local branches branch
branches=$(git branch --all | grep -v HEAD) &&
branch=$(echo "$branches" |
fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) &&
git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment