---
title: "Discussion on \"How To Delete a Git Branch Locally and Remotely\" | Hashnode"
description: "Discussion on \"How To Delete a Git Branch Locally and Remotely\". Learn the git commands and workflow required to delete branches both locally and remotely"
url: "https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c"
---

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

Discussion

# [How To Delete a Git Branch Locally and Remotely](https://eb504f93-c306-4167-9b91-d6100974045b.hashnode.dev/how-to-delete-a-git-branch-locally-and-remotely?utm_source=hashnode&utm_medium=feed)

Learn the git commands and workflow required to delete branches both locally and remotely

Apr 16, 2021 · 2 min read · eb504f93-c306-4167-9b91-d6100974045b.hashnode.dev  
Read the article

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

## Written by

[Catalin Pit](https://hashnode.com/@Catalinpit)

@Catalinpit

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

## Responses 2

Markdown supported · ⌘↵ to post

[Martin Thampi](https://hashnode.com/@martinkp)

[Apr 17, 2021](https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c/comment/607aad19c99e200d08f7aa91)

Amazing tip!

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Apr 19, 2021](https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c/comment/607aad19c99e200d08f7aa91#reply-607d1223c99e200d08f7dc58)

Thank you, [Martin Thampi](https://hashnode.com/@martinkp)!

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

[Apr 16, 2021](https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c/comment/607973952c39467e4cc32e07)

Wow, the timing of this article couldn't be any better. I was looking to know about how I can delete all of my old branches.

Also, is there a way to delete **all** branches at once? rather than specifying one at a time? 🤔

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Apr 16, 2021](https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c/comment/607973952c39467e4cc32e07#reply-60797af6b1e3c67faa75dca7)

Thank you, [Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)!

I got you; check [How To Delete All Local Git Branches In One Go](https://catalins.tech/how-to-delete-all-local-git-branches-in-one-go)! 🙌

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

[Apr 16, 2021](https://hashnode.com/posts/how-to-delete-a-git-branch-locally-and-remotely/607952b1e367ef73eed18e2c/comment/607973952c39467e4cc32e07#reply-60798ac7c7bf3703150098a9)

Thanks a lot [Catalin Pit](https://hashnode.com/@Catalinpit).
