Skip to content

Jean-Pierre Lambelet

Il n'y a pas de questions bêtes

  • Programming tips
  • General tips
  • About
  • EN
    • FR
    • EN
MacBook Pro affichant un éditeur de code

Photo de Emile Perron sur Unsplash

Delete all local git branches while retaining the master

April 29, 2026July 10, 2014 by Jean-Pierre Lambelet

After a sprint, all the local branches you have are useless and take up space. Below is a small command to remove them (except master)

git branch grep -v "master" xargs git branch -D
Categories Git
PHPUnit how to mocker / simulate an object and methods
Yii: Create a personalized relationship between two tables

À propos

Jean-Pierre Lambelet est un développeur web suisse. Ce blog rassemble ses astuces et tutoriels sur PHP, Symfony, Drupal, Docker et l'outillage de développement front-end.

Recent Posts

  • Giving a chatbot live weather through LLM tool calling
  • RAG explained to my mum
  • A Chrome extension to find unanswered WhatsApp chats
  • LLM – System prompt – Prevent contact hallucination with a registry
  • PostgreSQL – How to filter on a column with uppercase letters in its name
  • FR
  • EN

Recent Posts

  • Giving a chatbot live weather through LLM tool calling
  • RAG explained to my mum
  • A Chrome extension to find unanswered WhatsApp chats
© 2026 Jean-Pierre Lambelet • RSS feed • Privacy Policy