18 lines
291 B
Markdown
18 lines
291 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>`.
|
|
|
|
```sh
|
|
git branch -d <branch>
|
|
```
|
|
|
|
```sh
|
|
git checkout master
|
|
git branch -d patch-1 # Deletes the `patch-1` local branch
|
|
```
|