Make the current Git branch a master branch

前端 未结 14 1939
悲&欢浪女
悲&欢浪女 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:02

    One can also checkout all files from the other branch into master:

    git checkout master
    git checkout better_branch -- .
    

    and then commit all changes.

提交回复
热议问题