diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9ef60d69a..ff7f41d88 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -68,6 +68,16 @@ function grename() { # (sorted alphabetically by function name) # (order should follow README) # +function gcbn() { + # Check if we are in a Git repository + command git rev-parse --is-inside-work-tree &>/dev/null || return + + local branch + branch="$(git_current_branch)" || return + [[ -n "$branch" ]] || return 1 + + print -rn -- "$branch" | clipcopy +} # Similar to `gunwip` but recursive "Unwips" all recent `--wip--` commits not just the last one function gunwipall() {