diff --git a/modules/git/README.md b/modules/git/README.md index fad57a1..833092d 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -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: diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index f14cca5..91ed53f 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -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