Reset local repository branch to be just like remote repository HEAD

后端 未结 21 1911
挽巷
挽巷 2020-11-22 02:19

How do I reset my local branch to be just like the branch on the remote repository?

I did:

git reset --hard HEAD

But when I run a <

21条回答
  •  深忆病人
    2020-11-22 03:01

    I did:

    git branch -D master
    git checkout master
    

    to totally reset branch


    note, you should checkout to another branch to be able to delete required branch

提交回复
热议问题