Steps to delete a branch
Step 1: To get all local git branches in your project via the CLI
git branch
Step 2: To delete a branch locally type
git branch -d <branch name>
Sometimes git refuse to delete local branches when it contains commits that haven’t been merged into any other local branches or pushed to a remote repository. Hence, for forcefully delete a branch type
git branch -D <branch name>
By following these steps you can easily delete local branch in git.
How to Delete Local Branch in Git?
Git is a widely used distributed version control and source code management system. It effectively tracks changes to source code, enabling effortless branching, merging, and versioning.
Contact Us