diff --git a/Examples.md b/Examples.md index 11e2224..2d48428 100644 --- a/Examples.md +++ b/Examples.md @@ -120,6 +120,14 @@ fbr() { branch=$(echo "$branches" | fzf +m) && git checkout $(echo "$branch" | sed "s/.* //") } + +# fbr - checkout git branch (including remote branches) +fbr() { + local branches branch + branches=$(git branch --all | grep -v HEAD) && + branch=$(echo "$branches" | fzf-tmux -h 15 +m) && + git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##") +} ``` ```sh