Files
30-seconds-of-code/snippets/delete-branch.md
Isabelle Viktoria Maciohsek 7aaf48c3d6 Add delete branch
2021-04-04 21:50:29 +03:00

18 lines
298 B
Markdown

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