Files
30-seconds-of-code/snippets/delete-remote-branch.md
2022-05-04 19:36:40 +03:00

23 lines
491 B
Markdown

---
title: Delete a remote branch
tags: repository,branch
expertise: intermediate
author: maciv
cover: blog_images/waves-from-above.jpg
firstSeen: 2021-04-08T19:42:01+03:00
lastUpdated: 2021-04-13T21:10:59+03:00
---
Deletes a remote branch.
- Use `git push -d <remote> <branch>` to delete the specified remote `<branch>` on the given `<remote>`.
```shell
git push -d <remote> <branch>
```
```shell
git checkout master
git push -d origin patch-1 # Deletes the `patch-1` remote branch
```