英文:
I have created a feature branch from wrong branch and did my work on this branch
问题
示例如下:
master A --> 我的分支 B,--> 正确的分支 C
我本来要从 C 创建 B,但不小心从 A 创建了 B。而且 B 分支包含了我的一些提交。
我想要将 B 移动到 C 分支,并保留所有提交。请帮忙。
A ----> B
\ --> C
应该像这样:
A
\ --> C ----> B
英文:
example like : master A --> my branch B, --> correct branch C
I had to create B from C but accidentally created from A. and B branch has some of my commits as well.
I want to move B to the C branch with all commits. Pls Help.
A ----> B
\ --> C
It should be like this:
A
\ --> C ----> B
答案1
得分: 1
While branch B is checked out,
git rebase C
Other circumstances are described in detail at https://stackoverflow.com/q/29914052/1549818
英文:
While branch B is checked out,
git rebase C
Other circumstances are described in detail at https://stackoverflow.com/q/29914052/1549818
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论