[英]How to delete a branch in the remote repository using EGIT?
如何使用egit删除sourceforge中的远程分支本身及其中的所有文件?
Go to Team > Remote > Push…
from the menu. 从菜单中转到
Team > Remote > Push…
Select your repository, and click Next
. 选择存储库,然后单击“
Next
。 Under Remote ref to delete…
select your branch and click Add spec
. 在
Remote ref to delete…
选择您的分支,然后单击Add spec
。 Then click Finish
. 然后单击
Finish
。 This should delete the remote branch. 这应该删除远程分支。
(Update March 2012) (2012年3月更新)
As tukushan mentions in the comment: 正如tukushan在评论中提到:
In Egit 1.3.0, this only deletes the remote tracking branch in the local repository, not the remote branch.
在Egit 1.3.0中,这仅删除本地存储库中的远程跟踪分支,而不是远程分支。
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
. 正如Michael Mior在他的(upvoted)答案中详述的那样,你需要向远程分支推送“nothing” :
git push origin :branch
,来自git1.7 +更好地编码为git push origin --delete branch
。
With Egit, see " Delete Ref Specifications section ": 使用Egit,请参阅“ 删除参考规格部分 ”:
(Original answer December 2011) (原答案2011年12月)
You can also check out the very latest release of EGit (1.2, released yesterday December 23rd, 2011). 您还可以查看最新版本的EGit(1.2,2011年12月23日发布)。 You now have another way to delete a remote
您现在有另一种删除遥控器的方法
From its EGit/New and Noteworthy/1.2 : 从它的EGit / New和Noteworthy / 1.2 :
In the commit graph area, there is a new context menu action "
Delete Branch
" allowing to delete a branch.在提交图区域中,有一个新的上下文菜单操作“
Delete 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). 如果该选项可以删除远程命名空间上的提交分支(远程仓库的提交部分并在本地仓库中提取),则仍有待测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.