Photo by Kaitlyn Baker on Unsplash
Deleting a branch with Git
๐กA branch can be deleted, this applies only to locals branches.
1.- In this example, we are inside stable
branch because we are going to delete staging
branch. You should be inside a branch different that the branch you are going to delete. Use git checkout <branch's_name>
command to move you between branches.
git checkout stable
2.- See all branches with git branch
command.
git branch
3.- Delete the branch with git branch -d <branch's_name_to_delete>
command.
git branch -d staging
Reference:
ย