git discard all changes and pull from upstream

前端 未结 5 1137
迷失自我
迷失自我 2021-01-29 17:59

How do I fetch upstream repo and make it replace master? I only have one branch on my repo, which is master, and I completely messed it up, so I basically need to start over fro

5条回答
  •  星月不相逢
    2021-01-29 18:49

    I finally realized now that instead of

    git fetch --all && git reset --hard origin/master
    

    it should be

    git fetch --all && git reset --hard origin/
    

    instead (if one works on a different branch)

提交回复
热议问题