Sourcetree/GIT - 拉动时无法锁定参考/参考损坏 [英] Sourcetree/GIT - Cannot lock ref/reference broken, when pulling

查看:30
本文介绍了Sourcetree/GIT - 拉动时无法锁定参考/参考损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和一个同事在同一个分支上工作了一个星期,不断地推动/拉动变化,今天突然间,我点击了拉动",看看是否有任何我需要拉动的变化,我出错了.

A co-worker and I have been working on the same branch for a week, constantly pushing/pulling changes and all of a sudden today, I hit 'pull' to see if there were any changes I needed to pull and I got an error.

顺便说一下,这是在 sourcetree 中.错误是这样的:

This is in sourcetree by the way. The error was this:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
error: cannot lock ref 'refs/remotes/origin/angular_removal': unable to resolve reference 'refs/remotes/origin/angular_removal': reference broken
From https://bitbucket.org/colossus
 ! [new branch]        angular_removal -> origin/angular_removal  (unable to update local ref)

我在 sourcetree 中,它内置了一个终端,但我似乎无法在这里找到解决方案.

I'm in sourcetree, which has a terminal built in, but I can't seem to find a resolution here.

推荐答案

我能够通过删除 .git/packed-refs 文件中的所有项目来解决这个问题.

I was able to get this fixed by deleted all the items in the .git/packed-refs file.

然后我只是在终端中执行了 git pull 以从远程获取所有引用/代码.

Then I just did a git pull in terminal to get all the references/code from the remote.

这篇关于Sourcetree/GIT - 拉动时无法锁定参考/参考损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆