diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index bf2619976..e32136f15 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -31,6 +31,7 @@ function work_in_progress() { # Check if main exists and use instead of master function git_main_branch() { + command git rev-parse --git-dir &>/dev/null || return local branch for branch in main trunk; do if command git show-ref -q --verify refs/heads/$branch; then