A quick way to tidy up old Git branches | Version Control | Web Development

Опубликовано: 15 Март 2026
на канале: Tosbourn
1,022
45

Blog post version of this video: https://tosbourn.com/clean-merged-bra...

By running git branch --merged | egrep -v "(^\*|master|dev|main)" | xargs git branch -d (the details of which I explain in the video!) you can easily tidy up old git branches.

I recommend doing it from time to time to keep everything running nicely.

00:00 intro
00:26 showing off the command
01:29 running the command
01:47 how I got the commands to appear

-----

We help people with their web projects, from making websites and web apps, to helping with strategy and roadmap planning.

You can learn more about us on our website and LinkedIn;

https://tosbourn.com
  / 19658308  

#Git #TidyUp #Xargs #TextExpander #Terminal