Cleaning House
In the past month I’ve done a lot of traveling. Traveling means noodling – lots of topic branches laying around from airplane rides and hotel hacking. Today I decided to…
In the past month I’ve done a lot of traveling. Traveling means noodling – lots of topic branches laying around from airplane rides and hotel hacking. Today I decided to get rid of the topic branches which had been merged into master. But how?
When in doubt, ask Scott Chacon. Here’s how to delete all the branches which are a subset of master (and therefor contain nothing juicy):
git branch --contains master | grep -v master | xargs git branch -d
Written by
Related posts
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.