gitlab新建分支后idea没有刷新

网上找到两个办法:1. git pull 再更新项目 2.git fetch。然而,两者都不管用。以下是git fetch提示的报错信息。

error: cannot lock ref 'refs/remotes/origin/feature/lychee-wechat-commandation/commandation': 'refs/remotes/origin/feature/lychee-wechat-commandation' exists; cannot create 'refs/remotes/origin/feature/lychee-wechat-commandation/commandation'From http://gitlab.cloud.szunicom.com/wechatwork/lychee ! [new branch] feature/lychee-wechat-commandation/commandation -> origin/feature/lychee-wechat-commandation/commandation (unable to update local ref)error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches

其实,git fetch已经达到更新的目的,只是我的新老分支的命名是 a 和 a/b 这种类型,导致更新出现冲突。

提示已说明:使用命令git remote prune origin,可以刷新本地仓库,与远程仓库的改动保持一致。等待同步后,可以发现分支已更新。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Git有很多优势,其中之一就是远程操作非常简便。本文详细介绍5个Git命令,它们的概念和用法,理解了这些内容,你就...
    bondPang阅读 1,347评论 0 6
  • origin websiteComparing WorkflowsCentralized Workflow Fea...
    伍帆阅读 524评论 0 0
  • Git查看、删除、重命名远程分支和tag 姊妹篇:使用Git、Git GUI和TortoiseGit 这篇文章记录...
    素还真人阅读 3,039评论 0 1
  • 持续部署的前提是模块化设计、自动化测试和持续集成。使用好 Git 的分支(branch)与整合(integrate...
    michael_jia阅读 8,735评论 0 6
  • 一阵雨 一阵风 一片落叶 一个你
    彼岸花s阅读 199评论 0 0