Why call git branch --unset-upstream to fixup?

后端 未结 8 1390
夕颜
夕颜 2020-12-12 09:42

I\'m more of a novice when it comes to advanced operations in git. I maintain my blog using the blogging framework Octopress. Though Octopress is not under any development s

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 10:26

    I had this question twice, and it was always caused by the corruption of the git cache file at my local branch. I fixed it by writing the missing commit hash into that file. I got the right commit hash from the server and ran the following command locally:

    cat .git/refs/remotes/origin/feature/mybranch \
    echo 1edf9668426de67ab764af138a98342787dc87fe \
    >> .git/refs/remotes/origin/feature/mybranch
    

提交回复
热议问题