Deleting remote branches

4,130 views
Skip to first unread message

Mateusz

unread,
Apr 12, 2011, 9:31:44 AM4/12/11
to GitExtensions
Hi,

There are 2 problems with deleting remote branches:
1. Right-click on a branch and selecting "Delete branch" on remote
branch will provide error because Git Extensions probably calls:
git branch -d <remote_branch>
instead of:
git branch -d -r <remote_branch>

2. Currently there is no way to actually delete a branch on remote
repo. It is a welcomed feature because the best way to share your code
in GitHub and Gitorious is with feature branches for which Pull
Requests are created. After a while many merged feature branches can
trash your remote repo too much. To delete a remote branch following
command has to be called:
git push <repo_name> :<branch_name>
It should be used with caution as it is not reversible operation. I
suggest a dedicated additional warning when someone selects "master"
branch for such an action.

Is it possible to address above issues?

Best

Mat

0li ver

unread,
Apr 12, 2011, 9:36:10 AM4/12/11
to gitext...@googlegroups.com
I've noticed the same problem just recently (not being able to use the GUI to delete a remote branch) and reverted to using the bash with given syntax: git push myrepo :mybranch (note the space before the colon).

Would be nice to see this feature working in a future release :-)

Cheers, Oliver
_____________


---  Eulers Identität ---



2011/4/12 Mateusz <mateus...@gmail.com>

Henk Westhuis

unread,
Apr 12, 2011, 12:28:14 PM4/12/11
to gitext...@googlegroups.com
Hi,

I just fixed the delete branch function. The delete branch function now detects if the branch is remote and adds "-r" when needed. This will be fixed in the next version.

It already is possible to delete remote branches. This feature is hidden away in the push dialog. Just take a look at the "Push multiple branches" tab in the push dialog. Its not the best implementation for deleting remote branches, but it does work for now...

Henk

> Date: Tue, 12 Apr 2011 06:31:44 -0700
> Subject: Deleting remote branches
> From: mateus...@gmail.com
> To: gitext...@googlegroups.com

Mateusz

unread,
Apr 12, 2011, 12:40:15 PM4/12/11
to GitExtensions
Thanks Henk.

Best

Mat

On 12 Kwi, 18:28, Henk Westhuis <henk_westh...@hotmail.com> wrote:
> Hi,
>
> I just fixed the delete branch function. The delete branch function now detects if the branch is remote and adds "-r" when needed. This will be fixed in the next version.
>
> It already is possible to delete remote branches. This feature is hidden away in the push dialog. Just take a look at the "Push multiple branches" tab in the push dialog. Its not the best implementation for deleting remote branches, but it does work for now...
>
> Henk
>
> > Date: Tue, 12 Apr 2011 06:31:44 -0700
> > Subject: Deleting remote branches
> > From: mateusz.p...@gmail.com

swaroop balan

unread,
Feb 3, 2016, 5:26:02 AM2/3/16
to GitExtensions
Hi Henk,
I am currently using GIT extensions 2.48.05 and i am trying to delete remote branch and it is not working as expected .Please let me know what i am doing wrong

Arkady Shapkin

unread,
Feb 4, 2016, 8:14:43 AM2/4/16
to GitExtensions
Hi, it should work from "Push multiple branches" dialog
Reply all
Reply to author
Forward
0 new messages