1 parent e275cc5 commit 5407dc0Copy full SHA for 5407dc0
1 file changed
include/aliases
@@ -49,6 +49,7 @@ alias pushf='git push --force-with-lease origin $(git branch --show-current)'
49
alias branch='git branch'
50
alias checkout='git checkout'
51
alias gc_branches='git branch | grep -v "^* $(git branch --show-current)$" | xargs git branch -D'
52
+alias gc_worktrees="git worktree list --porcelain | awk '/^worktree / { if (++count > 1) print substr(\$0, 10) }' | xargs -I {} git worktree remove '{}'"
53
alias sync_submodules='git submodule update --init --recursive'
54
# gh
55
alias pr='gh pr create'
0 commit comments