80

How to delete the remote branch itself in sourceforge with all files in it, using egit ?

Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114

2 Answers2

151

Go to Team > Remote > Push… from the menu. Select your repository, and click Next. Under Remote ref to delete… select your branch and click Add spec. Then click Finish. This should delete the remote branch.

how-to-delete-remote-branch-in-eclipse-egit

Daniel Sokolowski
  • 11,982
  • 4
  • 69
  • 55
Michael Mior
  • 28,107
  • 9
  • 89
  • 113
13

(Update March 2012)

As tukushan mentions in the comment:

In Egit 1.3.0, this only deletes the remote tracking branch in the local repository, not the remote branch.

As Michael Mior details in his (upvoted) answer, you need to push "nothing" to the remote branch : git push origin :branch, which from git1.7+ is better coded as git push origin --delete branch.

With Egit, see "Delete Ref Specifications section":

Remote ref to delete in Egit


(Original answer December 2011)

You can also check out the very latest release of EGit (1.2, released yesterday December 23rd, 2011). You now have another way to delete a remote

From its EGit/New and Noteworthy/1.2:

In the commit graph area, there is a new context menu action "Delete Branch" allowing to delete a branch.
It will be enabled if a branch exists for the currently selected commit, which is not checked out.
If there is a single branch on this commit, which is not checked out, this action will delete this branch immediately.
If multiple such branches exist, a dialog will be shown asking which branches should be deleted.
If commits become unreachable on "Delete Branch" a confirmation dialog will be shown to prevent accidental unreachability of commits.

It remains to be tested if that option can delete a branch for a commit on a remote namespace (a commit part of a remote repo and fetched in your local repo).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • In Egit 1.3.0, this only deletes the remote tracking branch in the local repository, not the remote branch. – tekumara Mar 29 '12 at 04:57
  • @tukushan: right. I have edited my answer to make the correct answer visible (and reference Michael Mior's answer) – VonC Mar 29 '12 at 07:48