Is there an option to delete a branch with TortoiseGit?
I found a solution for the commandline. Is there an implementation in TortoiseGit?
The command to delete a local git branch can take one of two forms: git branch –delete old-branch. git branch -d old-branch.
Use TortoiseGit → Delete to remove files or folders from Git. When you TortoiseGit → Delete a file, it is removed from your working tree immediately as well as being marked for deletion in the repository on next commit.
If you are sure you want to delete it, run ' git branch -D issue-5632 '. This error is caused because we have some un-merged changes in branch issue-5632 due to which the branch delete has failed. In such case either you can delete the branch forcefully or merge the changes and then perform the delete operation.
To do that, you use the following command: git push <remote_name> --delete <branch_name>. The branch still exists locally, though. Since it has unmerged changes, you can delete it quickly using git branch -D hotfix after switching back to main.
You should read this article: Remote branches with TortoiseGit
According to this blog post:
...remove the local branch by first opening up the Checkout/Switch
dialog to get at the Browse refs
dialog.
In the Browse refs
dialog we can right click on the local branch and choose to delete it.
To delete a remote branch we can do the same thing, but instead of right clicking on our local branch we expand the remotes tree in the left part of the dialog and then locate the remote branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With