Add delete branch
This commit is contained in:
17
snippets/delete-branch.md
Normal file
17
snippets/delete-branch.md
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
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
|
||||
```
|
||||
Reference in New Issue
Block a user