Git worktree

From Logic Wiki
Jump to: navigation, search


git worktree list
git worktree remove <PATH>

Delete all local branches except main

Powershell:

git branch --format='%(refname:short)' |
    Where-Object { $_ -ne 'main' } |
    ForEach-Object { git branch -D $_ }