Reset local repository branch to be just like remote repository HEAD

后端 未结 21 1575
挽巷
挽巷 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:10

    No amount of reset and cleaning seemed to have any effect on untracked and modified files in my local git repo (I tried all the options above). My only solution to this was to rm the local repo and re-clone it from the remote.

    Fortunately I didn't have any other branches I cared about.

    xkcd: Git

提交回复
热议问题