Where knowledge empowers you to understand your world

How To Delete A Local Branch In Git

How To Delete A Git Branch – Locally

You can delete a local branch in Git using the following command:

git branch -D branchname

If you run that command with a lowercase ‘d’ and the branch was not fully merged, you may get the following error:

error: The branch 'branchname' is not fully merged.
If you are sure you want to delete it, run 'git branch -D branchname'.

Further Reading

How To Clone All Branches In Git