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

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

    error: refs/heads/t_1140 does not point to a valid object!
    

    So let's say you've tried pruning with this:

    git remote prune origin

    and you still CAN'T GET IT TO WORK, as a last resort, try deleting t_1140

    Basically,

    1. cd refs/heads

    2. rm -r t_1140

提交回复
热议问题