How to delete a Git branch with TortoiseGit has been partially answered here. However it doesn't cover the
git.exe branch -D to delete branch while not using libgit2 to delete refs. And, there is no use case for
-d option. See:
(From TortoiseGit 2.5.2 source code)
However, TortoiseGit usually asks user if they want to delete the branch. See:
Useful information: (from comment by @Fabien Bouleau)
Git with "-d" checks that the branch has been merged before deleting.
TortoiseGit shows an agnostic prompt, a confirmation to prevent a click by mistake.
But it does not preserve your work.
(If you deleted an unmerged branch, you can get it back by using Reflog dialog. Actually, get those commits back. :P )
Yes. TortoiseGit should do something for deleting unmerged branch.