How to delete all local branches? [Git]

Illia Sakovich

January 30, 2019

You can delete all local branches except current using this simple command:

git branch | grep -v '*' | xargs git branch -D
Illia Sakovich

Written by

Illia Sakovich

Founder of Coderello, full-stack developer.