What is the meaning of git reset --hard origin/master?

后端 未结 2 906
刺人心
刺人心 2021-01-29 17:58

I did a git pull and got an error:

The following working tree files would be overwritten by merge... Please move or remove them before you

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 18:36

    In newer version of git (2.23+) you can use:

    git switch -C master origin/master
    

    -C is same as --force-create. Related Reference Docs

提交回复
热议问题