Add delete snippets

This commit is contained in:
Isabelle Viktoria Maciohsek
2021-04-08 19:42:01 +03:00
committed by Chalarangelo
parent 09872076b1
commit 3ce861522c
4 changed files with 75 additions and 1 deletions

View File

@ -0,0 +1,17 @@
---
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
```