diff --git a/snippets/delete-branch.md b/snippets/delete-branch.md new file mode 100644 index 000000000..ea7b85aa1 --- /dev/null +++ b/snippets/delete-branch.md @@ -0,0 +1,17 @@ +--- +title: Delete a branch +tags: repository,branch,beginner +--- + +Deletes a local branch. + +- Use `git branch -d ` to delete the branch with the specified branch name. + +```sh +git branch -d +``` + +```sh +git checkout master +git branch -d patch-1 # Deletes the `patch-1` local branch +```