how to delete all your branches in git code example Example: delete all local branches git $ git branch | grep -v "master" | xargs git branch -D