Make the current Git branch a master branch

前端 未结 14 1940
悲&欢浪女
悲&欢浪女 2020-11-22 05:29

I have a repository in Git. I made a branch, then did some changes both to the master and to the branch.

Then, tens of commits later, I realized the branch is in muc

14条回答
  •  误落风尘
    2020-11-22 06:08

    My way of doing things is the following

    #Backup branch
    git checkout -b master_backup
    git push origin master_backup
    git checkout master
    #Hard Reset master branch to the last common commit
    git reset --hard e8c8597
    #Merge
    git merge develop
    

提交回复
热议问题