Getting rid of '… does not point to a valid object' for an old git branch

前端 未结 13 2038
不知归路
不知归路 2020-12-13 03:51

I have a fork of a Git repo and my clone appears to have an issue with an old, no longer existant, branch. I keep seeing this message:

error: refs/heads/t_1140

13条回答
  •  心在旅途
    2020-12-13 04:15

    You say that you have:

    also checked .git/refs/heads and there's no reference to t_1140

    ... which is very surprising. I can only see how this error would occur if the file .git/refs/heads/t_1140 exists. Is it possible you were mistaken about this?

    Correction: Charles Bailey points out below that the refs might be packed, in which case there is no corresponding file in .git/refs/heads

提交回复
热议问题