Change root of a branch in git

前端 未结 4 1391
予麋鹿
予麋鹿 2021-02-05 11:41

I\'m using git and want to change the base of an exiting branch. This is caused by a deployment system, which pulls this explicit branch into my production environment. When pla

4条回答
  •  醉梦人生
    2021-02-05 12:12

    git rebase should work for you:

    git checkout deploy
    git rebase master~1
    

    or

    git rebase v1.1
    

    Have a look at http://progit.org/book/ch3-6.html - should help you understand rebase better I think

提交回复
热议问题