How to delete the remote branch itself in sourceforge with all files in it, using egit ?
It is safe to delete your local branch after you pushed your changes to your own remote repository. The pull request is unrelated to this, because it is simply a request to the maintainers of the original repository to merge your changes back into their code base.
On GitHub.com, navigate to the main page of the repository. Above the list of files, click Branches. Scroll to the branch that you want to delete, then click . If you try to delete a branch that is associated with at least one open pull request, you must confirm that you intend to close the pull request(s).
To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .
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.
(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":
(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).
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