Published
- 1 min read
Delete all local branches except main
The solution for this is noted below
Delete all local branches except main
Solution
git branch | grep -v 'main' | xargs git branch -D
Try other methods by searching on the site. That is if this doesn’t work