开发者

Move several commits from one branch to another?

开发者 https://www.devze.com 2023-03-10 12:36 出处:网络
I started with branches master and develop. I made branch foo based off of dev开发者_如何学Goelop. 7 commits later and now I realize I wish i made it off of master. I can cherry pick each commit, no b

I started with branches master and develop. I made branch foo based off of dev开发者_如何学Goelop. 7 commits later and now I realize I wish i made it off of master. I can cherry pick each commit, no big deal, but is there a slicker way?


Try this. You can leave off the foo if it's the currently checked-out branch.

git rebase --onto master develop foo
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号