Files
30-seconds-of-code/snippets/delete-branch.md
Isabelle Viktoria Maciohsek 3ce861522c Add delete snippets
2021-04-08 19:42:01 +03:00

287 B

title, tags
title tags
Delete a branch repository,branch,beginner

Deletes a local branch.

  • Use git branch -d <branch> to delete the specified local <branch>.
git branch -d <branch>
git checkout master
git branch -d patch-1 # Deletes the `patch-1` local branch