mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
Merge 816b94f41c into 0912e05c05
This commit is contained in:
commit
65fdc30d6e
2 changed files with 9 additions and 0 deletions
|
|
@ -255,6 +255,7 @@ receive further support.
|
||||||
| `git_develop_branch` | Returns the name of the “development” branch: `dev`, `devel`, `development` if they exist, `develop` otherwise |
|
| `git_develop_branch` | Returns the name of the “development” branch: `dev`, `devel`, `development` if they exist, `develop` otherwise |
|
||||||
| `git_main_branch` | Returns the name of the main branch: `main` if it exists, `master` otherwise |
|
| `git_main_branch` | Returns the name of the main branch: `main` if it exists, `master` otherwise |
|
||||||
| `grename <old> <new>` | Renames branch `<old>` to `<new>`, including on the origin remote |
|
| `grename <old> <new>` | Renames branch `<old>` to `<new>`, including on the origin remote |
|
||||||
|
| `gcbc` | Copies the current branch name to the system clipboard (uses `clipcopy`) |
|
||||||
| `gbda` | Deletes all merged branches |
|
| `gbda` | Deletes all merged branches |
|
||||||
| `gbds` | Deletes all squash-merged branches (**Note: performance degrades with number of branches**) |
|
| `gbds` | Deletes all squash-merged branches (**Note: performance degrades with number of branches**) |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,14 @@ alias gbg='LANG=C git branch -vv | grep ": gone\]"'
|
||||||
alias gco='git checkout'
|
alias gco='git checkout'
|
||||||
alias gcor='git checkout --recurse-submodules'
|
alias gcor='git checkout --recurse-submodules'
|
||||||
alias gcb='git checkout -b'
|
alias gcb='git checkout -b'
|
||||||
|
function gcbc() {
|
||||||
|
local branch=$(git branch --show-current 2>/dev/null) || return
|
||||||
|
if [[ -z "$branch" ]]; then
|
||||||
|
print -u2 "gcbc: not on a branch"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
print -rn -- "$branch" | clipcopy
|
||||||
|
}
|
||||||
alias gcB='git checkout -B'
|
alias gcB='git checkout -B'
|
||||||
alias gcd='git checkout $(git_develop_branch)'
|
alias gcd='git checkout $(git_develop_branch)'
|
||||||
alias gcm='git checkout $(git_main_branch)'
|
alias gcm='git checkout $(git_main_branch)'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue