我在gitlab上删除后如何在phpstorm上删除远程分支?

时间:2015-02-17 09:35:27

标签: phpstorm gitlab

我在gitlab

上删除后如何在phpstorm上删除远程分支

在GitLab上删除该分支后,我无法在我的PhpStorm管理的本地仓库中选择相同的分支,而不会看到错误消息:

Failed to delete remote branch origin/branch1

unable to delete 'branch1': remote ref does not exist failed to push
some refs to 'http://user@gitlab.company.com/owner/projectname.git'

如何避免该错误消息?

1 个答案:

答案 0 :(得分:4)

当远程仓库不再具有特定分支时,可以看到这种情况,但像PhpStorm这样的IntelliJ GUI仍然将其引用为远程跟踪分支。
See IDEA-96402(2012年12月,尚未结束):

  

bitbucket.org上托管的项目上的远程分支机构不再存在,但仍在我的phpstorm安装中列出。

     
      
  1. Bitbucket不再列出分支
  2.   
  3. 当我从PHPSTORM中选择要删除的分支时,我收到消息
  4.   
Failed to delete remote branch origin/hotfix/bug-121: null: NON_EXISTING

现在解决方法是手动的:

  
      
  1. 您可以在命令行中调用git remote prune origin
  2.   
  3. 如果您致电Update Project从遥控器拉出,它将自动删除所有过时的引用。
  4.   

门票添加:

  

请注意,如果从IDE或命令行删除远程分支,则也会删除引用   此请求是关于删除分支上的远程引用,该分支通过其他方式从远程中删除,而不是从此存储库中删除。

相关问题