Git 在idea中切换分支时,报错提示Couldn’t checkout origin/test/20240319: cannot lock ref ‘origin/test/20240319’;‘refs/head/test’ exists;cannot create ‘refs/heads/test/20240319’

Git 在idea中切换分支时,报错提示Couldn’t checkout origin/test/20240319: cannot lock ref ‘origin/test/20240319’;‘refs/head/test’ exists;cannot create ‘refs/heads/test/20240319’

原因是我本地创建了一个名为test的分支,未提交到远程仓库;远程仓库有一个test/20240319 名称的 分支,导致在检出到本地仓库时,报上述错误,发生部分名称重复(test)。

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐