我的情况是这样......在同一个仓库工作的人从他的本地和远程仓库中删除了一个分支......
大多数在Stack Overflow或其他网站上询问此类问题的人都会git branch -a在其底部的远程跟踪分支列表中显示分支问题:
* master
develop
feature_blah
remotes/origin/master
remotes/origin/develop
remotes/origin/feature_blah
remotes/origin/random_branch_I_want_deleted
Run Code Online (Sandbox Code Playgroud)
但是,在我的情况下,不应该在那里的分支是本地的:
* master
develop
feature_blah
random_branch_I_want_deleted
remotes/origin/master
remotes/origin/develop
remotes/origin/feature_blah
Run Code Online (Sandbox Code Playgroud)
当我执行以下任何操作时,它不会在本地删除:
$ git prune
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
$ git remote prune origin
$ git fetch --prune
Run Code Online (Sandbox Code Playgroud)
更有用的信息:当我检查git remote show origin它是如何看起来:
* remote origin
Fetch URL: utilities:homeconnections_ui.git
Push URL: utilities:homeconnections_ui.git
HEAD branch: master
Remote branches:
master tracked
develop tracked
feature_blah tracked
other123 tracked
other444 tracked
other999 tracked
Local branches configured for 'git pull':
develop merges with remote …Run Code Online (Sandbox Code Playgroud) 完整信息:
error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec
From github.com:{github project url}
! a21359c..6273ffc user -> origin/user (unable to update local ref)
Run Code Online (Sandbox Code Playgroud) 我只有分支主人,我每次尝试"git pull"时都会收到此错误:
error: Couldn't set refs/remotes/origin/master
From /var/lib/git/xxx/project
! a0f80ea..49177a3 master -> origin/master (unable to update local ref)
Run Code Online (Sandbox Code Playgroud)
当我做"git pull origin master"时,我得到:
error: Couldn't set ORIG_HEAD
fatal: Cannot update the ref 'ORIG_HEAD'.
Run Code Online (Sandbox Code Playgroud)
我一直在寻找,但无法找到原因
从我们的中央服务器进入我的git存储库时,出现此错误:
$ git pull origin master
From http://aaa/repo
* branch master -> FETCH_HEAD
error: unable to resolve reference ORIG_HEAD: No such file or directory
fatal: Cannot lock the ref 'ORIG_HEAD'.
Run Code Online (Sandbox Code Playgroud)
我已经尝试了git gc(使用--prune = now)并寻找类似的错误,遗憾的是没有运气.
我的问题不是这个问题。
\n\n在拉动时,我收到以下错误 -
\n\n\n\n\n错误:无法更新引用\n \'refs/remotes/origin/features/name/surname\xe2\x80\x99:无法附加到\n \'.git/logs/refs/remotes/origin/features/name /姓氏\':不是目录
\n
添加用户权限并没有解决任何问题。
\n\n解决方案-\n然后只需从 GitHub 删除分支即可解决该问题。
\n\n有趣的是,这个分支的目录结构与其他分支不同。
\n\n而其他分支看起来像 -
\n\nrefs/remotes/origin/features/name\nRun Code Online (Sandbox Code Playgroud)\n\n这个看起来像——
\n\nrefs/remotes/origin/features/name/surname\nRun Code Online (Sandbox Code Playgroud)\n 我在尝试git获取远程分支时遇到以下错误:
错误:REF裁判/产地/遥控器/我的分支是在一些哈希,但预计其他哈希 从github.com:我的仓库 !some-hash my-branch - > origin/my-branch(无法更新本地引用)
我不知道到底爆炸了什么.任何启示?