We know that if you want to delete a branch after it has been merge to master, you can execute the command:
Git branch-d dev-new-feature
This allows us to delete the Dev-new-feature branch.
But if the branch that is going to be deleted is a branch that does not have a merge, there is a hint like this:
$ git branch-d feature-vulcan
error:the branch ' Feature-vulcan ' is not fully merged.
If you're sure want to delete it, run ' git branch-d feature-vulcan '.
This hint tells us that the Feature-vulcan branch has not been merged, if deleted, will lose the modification, if you want to forcibly delete, you need to use the command git branch-d feature-vulcan.
Now we forcibly delete:
$ git branch-d feature-vulcan
Deleted Branch Feature-vulcan (was 756d4af).
Finally deleted the success.
Summary
To develop a new feature, it is better to create a new branch;
If you want to discard a branch that has not been merged, you can use git branch-d <name> forcibly delete it.