Created
July 15, 2026 06:02
-
-
Save mdiener21/d9795d72a6e21775536e29be6471fd91 to your computer and use it in GitHub Desktop.
git worktree alias for my bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global alias.wta '!f() { git worktree add -b "$1" "../$1"; }; f' | |
| git config --global alias.wtr '!f() { git worktree remove "../$1"; }; f' | |
| git config --global alias.wtl '!f() { git worktree list; }; f' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
List worktrees
git wtl
Add a worktree
git wta name-of-my-worktree
Remove a worktree
git wtr name-of-my-worktree