gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 01:01:15 25 4
gpt4 key购买 nike

在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'

如何避免该错误消息?

最佳答案

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

Remote branches on a project hosted on bitbucket.org don't exist anymore, but are still listed on my phpstorm installation.

  1. Bitbucket does not list the branch anymore
  2. When I select the branch to delete from within PHPSTORM, i receive the message

Failed to delete remote branch origin/hotfix/bug-121: null: NON_EXISTING

目前的解决方法是手动解决方法:

  1. You can call git remote prune origin in the command line.
  2. If you call Update Project to pull from the remote, it will automatically prune all obsolete references.


门票补充说:

Note that if you delete a remote branch from the IDE or from the command line, the reference is deleted as well.
This request is about deleting remote reference on the branch which was removed from the remote via some other way, not from this repository.

关于phpstorm - 在gitlab上删除后如何删除phpstorm上的远程分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28558722/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com