This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209644 - Can't remove remote branch
Summary: Can't remove remote branch
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.1.1
Hardware: All All
: P3 normal with 4 votes (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
: 221617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-16 06:22 UTC by svsool
Modified: 2013-05-23 02:36 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description svsool 2012-03-16 06:22:26 UTC
When I remove remote branch in git explorer, it's not removed on github.
Comment 1 Ondrej Vrabec 2012-03-16 06:59:42 UTC
Because the repository browser contains only local repositories, there's no way to delete a branch from a remote repository. Generally in Git you can delete a branch from a remote repository with the push command and specifying a certain attribute to it. True that's not possible in the IDE either, but i have no plans to implement it since i consider this a not widely used feature and not worth the effort. Just use commandline for branch removal from github.
Comment 2 svsool 2012-03-16 14:17:28 UTC
ok, thank you
Comment 3 nysander 2012-03-26 06:22:12 UTC
I also miss that feature, I think that this could be implemented if get some level of votes.
Comment 4 Ondrej Vrabec 2013-01-18 13:11:47 UTC
*** Bug 221617 has been marked as a duplicate of this bug. ***
Comment 5 misterm 2013-01-18 13:22:33 UTC
This is something very common using git, since branching is cheap. You create an experimental branch, have your peers review it and in the end you remove it, whether it succeeded (was integrated on master) or failed. Please support it.
Comment 6 Ondrej Vrabec 2013-01-18 13:30:37 UTC
misterm: any idea how this could be achieved in the UI? Could you describe how you usually do it without the support in the IDE?
Because i very occasionally delete a remote branch i don't know the usual workflow. Do you delete the *local* branch (as in refs/heads/) and then run git push :refs/heads/BRANCH? Or do you start by deleting the branch under remotes (as in refs/remotes/origin/BRANCH)? I am trying to imagine how it could be done in UI
Comment 7 jdavidbakr 2013-01-26 18:44:18 UTC
I am experiencing the same thing, it would be great if deleting a branch under "remote branches" would delete the remote branch as you would from the command line.

My issue is that I've not figured out how to set up the origin so that I can connect to my remote git repository from both the IDE and the command line.  (We use gitolite for our internal git repositories).  If I configure it so that it works from the command line, it doesn't work in NetBeans, and vice versa.  My solution  right now is to have two clones on my local box - one for NetBeans and one for the command line - and then do the remote branch removal from the command line.

As for our use case, we use git-flow to manage our projects.  We would like to be able to push feature branches for multiple programmers to be able to work on them, then delete the remote feature branches after merging them back into the develop branch.  Currently this is a very cumbersome process, especially since it requires cloning a second copy from the command line.
Comment 8 misterm 2013-02-27 14:03:57 UTC
(In reply to comment #6)
> misterm: any idea how this could be achieved in the UI? 

In Git Repository Browser, you would open the repository, go to Branches -> Local and when you choose Delete Branch it would ask if you want to push the change to the remote branch as well.

> Could you describe how you usually do it without the support in the IDE?
> Because i very occasionally delete a remote branch i don't know the usual
> workflow. Do you delete the *local* branch (as in refs/heads/) and then run git
> push :refs/heads/BRANCH? Or do you start by deleting the branch under remotes
> (as in refs/remotes/origin/BRANCH)? I am trying to imagine how it could be done
> in UI

Delete the local branch and push.
Comment 9 dylanv 2013-05-21 03:30:06 UTC
I second this, whats worse is that it actually shows that the branch was deleted. Either remove the feature that 'pseudo' removes the branch so we know we cant delete it (which would be all sort of stupid) or better still implement the git command 'git push <remoteconnection> --delete <branch>'.

I really do hope this gets fixed, as its not only a bit of a critical feature, its also misleading in terms of how the IDE currently deals with this. "Delete the local branch and push." <- is this not completely obvious?
Comment 10 Ondrej Vrabec 2013-05-21 08:05:44 UTC
> I second this, whats worse is that it actually shows that the branch was deleted. Either remove the feature that 'pseudo' removes the branch so we know we cant delete it (which would be all sort of stupid) or better still implement the git command 'git push <remoteconnection> --delete <branch>'.
What pseudo feature are you talking about? What dialog shows the branch is deleted? Please make a screenshot.
Comment 11 Ondrej Vrabec 2013-05-21 15:21:47 UTC
fix: http://hg.netbeans.org/core-main/rev/bb549eae817a
Comment 12 dylanv 2013-05-21 15:30:37 UTC
OVER 9000 DUKE POINTS!!!!!! ;) Thanks a million
Comment 13 Quality Engineering 2013-05-23 02:36:54 UTC
Integrated into 'main-golden', will be available in build *201305222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bb549eae817a
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #209644 - Can't remove remote branch
offer a branch from a remote repo to be deleted in the push dialog