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

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

    This fixed it for me:

    git push origin :refs/remotes/origin/[branch name]
    git push origin :refs/heads/origin/[branch name]
    

    WARNING: this deletes the branch from the server - any changes on that branch that have not been merged to another branch will be lost.

    0 讨论(0)
提交回复
热议问题