@@ -83,6 +83,28 @@ Default output order:
8383- ` base ` group second
8484- alphabetical order inside each group
8585
86+ ## Worktree add (` gwta ` )
87+
88+ ` gwta ` is a smart wrapper for ` git worktree add ` .
89+
90+ Auto path mode (no path provided):
91+
92+ ``` powershell
93+ gwta 8698
94+ gwta -b feature/new-worktree
95+ ```
96+
97+ By default, worktrees are created under:
98+ - ` %LOCALAPPDATA%\git-worktrees\<repo-name>\... `
99+ - override root with ` GIT_ALIASES_EXTRA_WORKTREE_ROOT `
100+
101+ Branch completion (Tab) works for:
102+ - ` gwta -b <TAB> `
103+ - ` gwta <path> <TAB> `
104+ - ` gwta <path> -f <TAB> `
105+ - ` gwt add <path> <TAB> `
106+ - ` gwt add <path> -f <TAB> `
107+
86108## Aliases
87109
88110| Alias | Command | Source |
@@ -95,21 +117,21 @@ Default output order:
95117| gdt | git diff-tree --no-commit-id --name-only -r @args | extra |
96118| gdv | git diff -w @args \| Out-String \| less | extra |
97119| gfo | git fetch origin @args | extra |
98- | gfp | Create ` format-patch ` mbox (` --cover-letter --stat --stdout ` ) from ` <remote>/<target>..HEAD ` . [ source] ( ./git-aliases-extra.psm1#L519 ) | extra |
99- | ghash | Return commit hash for HEAD or HEAD~ N (` -Short ` supported). [ source] ( ./git-aliases-extra.psm1#L486 ) | extra |
120+ | gfp | Create ` format-patch ` mbox (` --cover-letter --stat --stdout ` ) from ` <remote>/<target>..HEAD ` . [ source] ( ./git-aliases-extra.psm1#L848 ) | extra |
121+ | ghash | Return commit hash for HEAD or HEAD~ N (` -Short ` supported). [ source] ( ./git-aliases-extra.psm1#L815 ) | extra |
100122| glp | param([ string] $format) if($format){ git log --pretty=$format } else { git log } | extra |
101123| gmtl | git mergetool --no-prompt @args | extra |
102124| gmtlvim | git mergetool --no-prompt --tool=vimdiff @args | extra |
103125| grl | git reflog @args | extra |
104126| grsh | git reset --soft HEAD~ 1 | extra |
105- | gsw | Switch to local branch or create tracking branch for remote-only target. [ source] ( ./git-aliases-extra.psm1#L594 ) | extra |
127+ | gsw | Switch to local branch or create tracking branch for remote-only target. [ source] ( ./git-aliases-extra.psm1#L923 ) | extra |
106128| gswc | git switch -c @args | extra |
107129| gtl | param($p='') git tag --sort=-v: refname -n -l "$p* " | extra |
108130| gtv | git tag \| Sort-Object { $_ -as [ version] } | extra |
109131| gunwip | if (git log -n 1 \| Select-String -Quiet -- "--wip--") { git reset HEAD~ 1 } | extra |
110132| gwip | git add -A; git rm (git ls-files --deleted) 2>$null; git commit --no-verify --no-gpg-sign -m "--wip-- [ skip ci] " | extra |
111133| gwt | git worktree @args | extra |
112- | gwta | git worktree add @ args | extra |
134+ | gwta | Add worktree with smart defaults: supports auto path when omitted ( ` %LOCALAPPDATA%\\git-worktrees\\<repo>\\... ` ) and branch-aware completion for ` -b/-B ` and start-point positions. [ source ] ( ./git-aliases-extra.psm1#L700 ) | extra |
113135| gwtl | git worktree list @args | extra |
114136| gwtm | git worktree move @args | extra |
115137| gwtp | git worktree prune @args | extra |
0 commit comments