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

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

    I had this issue when attempting to clone some github repositories, the system I was on was running an older version of git v1.7.4, a quick update fixed it up.

    remote: Counting objects: 533, done.
    remote: Compressing objects: 100% (248/248), done.
    remote: Total 533 (delta 232), reused 529 (delta 230)
    Receiving objects: 100% (533/533), 121.36 KiB, done.
    Resolving deltas: 100% (232/232), done.
    error: refs/remotes/origin/master does not point to a valid object!
    verror: Trying to write ref refs/heads/master with nonexistant object 0457f3e2e9432e07a1005f0f4161dc4b8215f128
    fatal: Cannot update the ref 'HEAD'.
    

提交回复
热议问题