git fetch命令执行后输出 error: cannot lock ref
phpcn_u1582
phpcn_u1582 2017-05-02 09:42:35
0
1
809

在gitlab上面创建了两个分支,其中一个名字叫release/sprint12

然后运行git fetch的时候报错了,参照stackoverflow上面的答案删除本地文件夹.git/refs/remotes/origin/release
后重新运行git fetch还是报同样的错,报错如下:


另外,我到.git/refs/remotes/origin/release文件夹下面去查看了,是空的,并没有sprint12文件夹。

这个问题有人遇到过吗?

phpcn_u1582
phpcn_u1582

reply all (1)
漂亮男人

I know what happened

1. Rungit remote show originand all information will be displayed, includingbranches that are deleted remotely but retainedlocally.


2. Runninggit remote prune origin即可删除本地分支release

3.Rungit fetch获取新分支release/sprint12

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!