我在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'
Run Code Online (Sandbox Code Playgroud)
如何避免该错误消息?
当远程仓库不再具有特定的分支,但是像PhpStorm这样的IntelliJ GUI仍将其引用为远程跟踪分支时,就会看到这种情况。
请参阅IDEA-96402(2012年12月,尚未关闭):
在bitbucket.org上托管的项目上的远程分支不再存在,但仍在我的phpstorm安装中列出。
- Bitbucket不再列出分支
- 当我选择要从PHPSTORM中删除的分支时,我收到消息
Failed to delete remote branch origin/hotfix/bug-121: null: NON_EXISTING
Run Code Online (Sandbox Code Playgroud)
解决方法现在是手动的:
- 您可以
git remote prune origin在命令行中调用。- 如果您呼叫
Update Project从远端拉取,它将自动修剪所有过时的引用。
凭单添加:
请注意,如果您从IDE或命令行中删除远程分支,则该引用也将被删除。
该请求是关于删除分支上的远程引用,该分支是通过其他方式(而不是从此存储库)从远程删除的。
| 归档时间: |
|
| 查看次数: |
2249 次 |
| 最近记录: |