diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index ab29537..1129619 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -217,7 +217,7 @@ function forgit::checkout::branch -d "git checkout branch selector" --argument-n forgit::inside_work_tree || return 1 if test -n "$input_branch_name" - git checkout -B "$input_branch_name" + git checkout -b "$input_branch_name" set checkout_status $status git status --short return $checkout_status diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index 442fa13..2dce324 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -218,7 +218,7 @@ forgit::checkout::file() { # git checkout-branch selector forgit::checkout::branch() { forgit::inside_work_tree || return 1 - [[ $# -ne 0 ]] && { git checkout -B "$@"; return $?; } + [[ $# -ne 0 ]] && { git checkout -b "$@"; return $?; } local cmd preview opts branch cmd="git branch --color=always --verbose --all | sort -k1.1,1.1 -r" preview="git log {1} --graph --pretty=format:'$forgit_log_format' --color=always --abbrev-commit --date=relative"