mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-30 21:57:44 +00:00
Enhance gwta (#1143)
Allow automatic association to an existing branch or creation of new branch with `gwta` when 2nd positional parameter (`branch`) is omitted.
This commit is contained in:
parent
b09b60cc43
commit
ba9a4c1cac
1 changed files with 7 additions and 2 deletions
|
@ -225,8 +225,12 @@ export alias gupav = git pull --rebase --autostash --verbose
|
|||
export alias gwch = git whatchanged -p --abbrev-commit --pretty=medium
|
||||
|
||||
export alias gwt = git worktree
|
||||
export def gwta [path: path, branch: string] {
|
||||
export def gwta [path: path, branch?: string] {
|
||||
if $branch != null {
|
||||
git worktree add $path $branch
|
||||
} else {
|
||||
git worktree add $path
|
||||
}
|
||||
}
|
||||
export alias gwtls = git worktree list
|
||||
export alias gwtmv = git worktree move
|
||||
|
@ -239,3 +243,4 @@ export alias gamc = git am --continue
|
|||
export alias gams = git am --skip
|
||||
export alias gama = git am --abort
|
||||
export alias gamscp = git am --show-current-patch
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue