aboutsummaryrefslogtreecommitdiff
path: root/config/zsh/aliases/git.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'config/zsh/aliases/git.zsh')
-rw-r--r--config/zsh/aliases/git.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/zsh/aliases/git.zsh b/config/zsh/aliases/git.zsh
index 18f988d..c33781d 100644
--- a/config/zsh/aliases/git.zsh
+++ b/config/zsh/aliases/git.zsh
@@ -93,8 +93,8 @@ gco() {
if ! [ "$#" = "0" ]; then
git checkout "$@";
else
- local b="$(git branch | fzf | xargs)";
- [ -n "$b" ] && git switch "$b";
+ local b="$(git branch --format '%(refname:short)' | fzf)";
+ [ -n "$b" ] && git checkout "$b";
fi
}