Files
30-seconds-of-code/snippets/delete-remote-branch.md
Isabelle Viktoria Maciohsek 3ce861522c Add delete snippets
2021-04-08 19:42:01 +03:00

18 lines
344 B
Markdown

---
title: Delete a remote branch
tags: repository,branch,intermediate
---
Deletes a remote branch.
- Use `git push -d <remote> <branch>` to delete the specified remote `<branch>` on the given `<remote>`.
```sh
git push -d <remote> <branch>
```
```sh
git checkout master
git push -d origin patch-1 # Deletes the `patch-1` remote branch
```