Files
30-seconds-of-code/snippets/delete-branch.md
2021-04-13 21:10:59 +03:00

18 lines
297 B
Markdown

---
title: Delete a branch
tags: repository,branch,intermediate
---
Deletes a local branch.
- Use `git branch -d <branch>` to delete the specified local `<branch>`.
```shell
git branch -d <branch>
```
```shell
git checkout master
git branch -d patch-1 # Deletes the `patch-1` local branch
```