---
title: "Discussion on \"How to Remove All the Git Branches Except the Master Locally\" | Hashnode"
description: "Discussion on \"How to Remove All the Git Branches Except the Master Locally\". Note: I've moved all my projects to use the main instead of master branch.\nI'm writing this post a note to my future forgetful self.\nToday, I ran into a really stupid issue. I worked on updating a remote git repo, and I've already merged and deleted ..."
url: "https://hashnode.com/posts/how-to-remove-all-the-git-branches-except-the-master-locally/5ea06e5f0135fc417662a04b"
---

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

Discussion

# [How to Remove All the Git Branches Except the Master Locally](https://mmaksimovic.dev/how-to-remove-all-the-git-branches-except-the-master-locally?utm_source=hashnode&utm_medium=feed)

Note: I've moved all my projects to use the main instead of master branch. I'm writing this post a note to my future forgetful self. Today, I ran into a really stupid issue. I worked on updating a remote git repo, and I've already merged and deleted ...

Apr 22, 2020 · 2 min read · mmaksimovic.dev  
Updated Aug 3, 2020  
Read the article

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

## Written by

[Milica Maksimović](https://hashnode.com/@mmaksimovic)

@mmaksimovic · Novi Sad

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

founder Literally.dev, ex-Growth @wasp, former Community Manager @Hashnode

I am a marketer in love with tech and building communities around products. My passion is understanding how things work, what people think, and how organizations function.

## Responses 1

Markdown supported · ⌘↵ to post

No responses yet.
