Welcome to my personal website. I use this space to share some of my thoughts and software that I write in my free time. Sometimes I also publish photos. If you want to get in touch please use LinkedIn or Mastodon.
To mass remove git branches from a git repository, you can use the following commands:
git branch | grep'fewald' | xargs git branch -D
This command does the following:
git branch: Lists all local branches in the repository.
grep 'fewald': Filters the list of branches to only include those that contain the string ‘fewald’.
xargs git branch -D: Passes the filtered list of branches to the git branch -D command, which forcefully deletes each branch.
About the author
Friedrich Ewald is a Staff Software Engineer with a Master's degree in Computer Science. He started this website in late 2015, mostly as a digital business card. He is interested in Go, Python, Ruby, SQL- and NoSQL-databases, machine learning and AI and is experienced in building scalable, distributed systems and micro-services at multiple larger and smaller companies.