How do you delete a branch locally in Git?
a)
git branch -d branch-nameb)
git remove branch-namec)
git delete branch-named)
git erase branch-nameAnswer:
a)
git branch -d branch-nameExplanation:
The git branch -d branch-name command is used to delete a branch locally in Git. It removes the specified branch from your local repository but does not affect any remote branches.
For example, git branch -d feature-branch deletes the feature-branch from your local environment. If you want to force-delete a branch, you can use -D instead of -d.
Deleting branches is important for keeping your repository organized, especially after a feature branch has been merged or is no longer needed.