how to reset develop branch to master

前端 未结 3 1625
陌清茗
陌清茗 2021-01-30 12:27

I have develop & master branches, my develop branch is messy now and i would like to reset it and make it as a copy of my master

3条回答
  •  情书的邮戳
    2021-01-30 13:19

    I'm a bit late to the party, however, after merging my dev branch into the master and pushing to the server, I do the following:

    git fetch

    git checkout development

    git merge origin/master

    git push

    The the dev branch is one commit ahead of the master branch, and other developers don't have to worry about all commits in the development branch being reset.

提交回复
热议问题