---
title: "Discussion on \"Clean up your git branches\" | Hashnode"
description: "Discussion on \"Clean up your git branches\". To delete multiple Git branches at once, you can use the combination of git branch, grep, and xargs commands. The git branch command lists all local branches, grep -v master filters out the master branch from the output, and xargs git branch -D delet..."
url: "https://hashnode.com/posts/clean-up-your-git-branches/646ff4ecc8a0c7535e311e95"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Clean up your git branches](https://raihan.hashnode.dev/clean-up-your-git-branches?utm_source=hashnode&utm_medium=feed)

To delete multiple Git branches at once, you can use the combination of git branch, grep, and xargs commands. The git branch command lists all local branches, grep -v master filters out the master branch from the output, and xargs git branch -D delet...

May 25, 2023 · 1 min read · raihan.hashnode.dev  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#bash](https://hashnode.com/tag/bash)

## Written by

[Mostafa Raihan](https://hashnode.com/@raihan)

@raihan · Jashore, Bangladesh

  
[View profile](https://hashnode.com/@raihan)

software engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
