How can I pull down a commit from Github (Enterprise) that I don't have locally?

前端 未结 3 549
滥情空心
滥情空心 2021-02-05 19:46

I accidentally did a push --force on the wrong repo (too many termminals open), effectively resetting the master branch back to an earlier commit.

Looking a

3条回答
  •  温柔的废话
    2021-02-05 20:09

    Is XYZ is reachable by some branch you can simply fetch. If not, please follow @weste's instructions to get it pointed to by a branch and then fetch:

    git fetch
    git checkout master
    git reset --hard XYZ
    git push -f origin master
    

提交回复
热议问题