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

前端 未结 13 2022
不知归路
不知归路 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:18

    I had this problem and none of the remedies suggested above worked. So I edited .git/packed-refs and removed the line that mentioned the non-existent branch. All was suddenly well.

    Gotta love those human-readable file formats ...

提交回复
热议问题