GIT - How to make a branch be the same as master

后端 未结 1 425
遇见更好的自我
遇见更好的自我 2020-12-31 02:36

I have a website using git

The setup has the master branch as the live site and a develop branch as the dev domain which is used for testing features before they go

相关标签:
1条回答
  • 2020-12-31 02:51

    If you don't care about preserving develop just checkout develop and reset it to master.

    # make sure master is up to date before you do this
    git checkout develop
    git reset --hard master
    git push -f # force push the branch
    

    This is often done for an integration branch every morning, so that the nightly integration is always based on master.

    0 讨论(0)
提交回复
热议问题