How to move the current working branch to master branch in git

后端 未结 10 1008
挽巷
挽巷 2020-12-13 00:13

I have currently one of the project it contain more branches. master branch not yet merger long time. So i want switched to master with latest code.

Can you please g

10条回答
  •  执笔经年
    2020-12-13 00:55

    Maybe it's not so clean, but it works for me

    • git pull #to get all changes
    • switch to my_branch
    • copy all files tmp dir
    • switch to master
    • remove all files in master
    • copy files from tmp dir
    • commit

提交回复
热议问题