1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2026-04-18 13:24:04 +00:00

git: add git worktree management aliases

This commit is contained in:
Benjamin Grandfond
2025-09-28 19:57:58 +02:00
committed by Indrajit Raychaudhuri
parent 331adc4a69
commit bd4e084ab0
2 changed files with 17 additions and 0 deletions

View File

@@ -323,6 +323,15 @@ zstyle ':prezto:module:git:alias' skip 'yes'
- `gwX` removes files from the working tree and from the index recursively and
forcefully.
### Worktree management (W)
- `gWa` add a new working tree.
- `gWl` list all working trees.
- `gWx` removes a working tree.
- `gWX` removes a working tree and forcefully.
- `gWm` moves a working tree to a new location.
- `gWc` prunes all the working trees.
### Shadows
The following aliases may shadow system commands:

View File

@@ -272,4 +272,12 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then
alias gwC='git clean --force'
alias gwx='git rm -r'
alias gwX='git rm -r --force'
# Worktree management (W)
alias gWa='git worktree add'
alias gWl='git worktree list'
alias gWx='git worktree remove'
alias gWX='git worktree remove --force'
alias gWm='git worktree move'
alias gWc='git worktree prune'
fi