merge git 如何将最终结果合并到目标分支?
How merge git imerge final result to target branch?
我用git-imerge合并两个b运行ches.
git checkout branchA
git-imerge start --name=merge-devolp-to-A--first-parent --goal=rebase-with-history develop
I 运行 以上命令,将 develop b运行ch 合并到 b运行chA.
merge完成后,git-imerge将最终结果放到一个detached HEAD中,我将HEAD放到一个新的b运行ch中。
git branch merged ca9d786
这些提交让整个跟踪看起来一团糟,我不认为谁能理解什么是合并 x-x。
所以我能做些什么,将真正的最终合并结果用于开发 b运行ch 或 b运行chA,并且只有一次提交且消息不错?
日志 -
$ git-imerge start --name=merge-dev-to-branchA --first-parent --goal=rebase-with-history develop
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9272/9272), done.
Checking out files: 100% (9643/9643), done.
Attempting automerge of 7-11...failure.
Attempting automerge of 1-1...success.
Attempting automerge of 1-7...success.
Attempting automerge of 1-10...success.
Attempting automerge of 1-11...success.
Attempting automerge of 7-11...failure.
Attempting automerge of 4-11...failure.
Attempting automerge of 3-11...failure.
Attempting automerge of 2-11...failure.
Attempting automerge of 2-1...success.
Attempting automerge of 2-6...failure.
Attempting automerge of 2-4...failure.
Attempting automerge of 2-3...success.
Attempting automerge of 7-3...success.
Autofilling 1-1...success.
Autofilling 1-2...success.
Autofilling 1-3...success.
Autofilling 1-4...success.
Autofilling 1-5...success.
Autofilling 1-6...success.
Autofilling 1-7...success.
Autofilling 1-8...success.
Autofilling 1-9...success.
Autofilling 1-10...success.
Autofilling 1-11...success.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[0:2,0:12].
Autofilling 2-3...success.
Autofilling 3-3...success.
Autofilling 4-3...success.
Autofilling 5-3...success.
Autofilling 6-3...success.
Autofilling 7-1...success.
Autofilling 7-2...success.
Autofilling 7-3 (first way)...success.
Autofilling 7-3 (second way)...success.
The two ways of autofilling 7-3 agree.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[1:8,0:4].
Attempting automerge of 7-11...success.
Autofilling 2-11...success.
Autofilling 3-11...success.
Autofilling 4-11...success.
Autofilling 5-11...success.
Autofilling 6-11...success.
Autofilling 7-4...success.
Autofilling 7-5...success.
Autofilling 7-6...success.
Autofilling 7-7...success.
Autofilling 7-8...success.
Autofilling 7-9...success.
Autofilling 7-10...success.
Autofilling 7-11 (first way)...success.
Autofilling 7-11 (second way)...success.
The two ways of autofilling 7-11 agree.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[1:8,3:12].
Merge is complete!
如果你想要一个简单的合并作为最终结果,那么你应该设置--goal=merge
:
git-imerge start --name=merge-develop-to-A --first-parent --goal=merge develop
或者,更简单地说,
git-imerge merge develop
然后,当导入完成并且您对结果满意时,重要的是输入
git-imerge finish
,清理中间合并并将原始分支设置为指向结果。
我用git-imerge合并两个b运行ches.
git checkout branchA
git-imerge start --name=merge-devolp-to-A--first-parent --goal=rebase-with-history develop
I 运行 以上命令,将 develop b运行ch 合并到 b运行chA.
merge完成后,git-imerge将最终结果放到一个detached HEAD中,我将HEAD放到一个新的b运行ch中。
git branch merged ca9d786
这些提交让整个跟踪看起来一团糟,我不认为谁能理解什么是合并 x-x。
所以我能做些什么,将真正的最终合并结果用于开发 b运行ch 或 b运行chA,并且只有一次提交且消息不错?
日志 -
$ git-imerge start --name=merge-dev-to-branchA --first-parent --goal=rebase-with-history develop
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9302/9302), done.
Checking out files: 100% (9272/9272), done.
Checking out files: 100% (9643/9643), done.
Attempting automerge of 7-11...failure.
Attempting automerge of 1-1...success.
Attempting automerge of 1-7...success.
Attempting automerge of 1-10...success.
Attempting automerge of 1-11...success.
Attempting automerge of 7-11...failure.
Attempting automerge of 4-11...failure.
Attempting automerge of 3-11...failure.
Attempting automerge of 2-11...failure.
Attempting automerge of 2-1...success.
Attempting automerge of 2-6...failure.
Attempting automerge of 2-4...failure.
Attempting automerge of 2-3...success.
Attempting automerge of 7-3...success.
Autofilling 1-1...success.
Autofilling 1-2...success.
Autofilling 1-3...success.
Autofilling 1-4...success.
Autofilling 1-5...success.
Autofilling 1-6...success.
Autofilling 1-7...success.
Autofilling 1-8...success.
Autofilling 1-9...success.
Autofilling 1-10...success.
Autofilling 1-11...success.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[0:2,0:12].
Autofilling 2-3...success.
Autofilling 3-3...success.
Autofilling 4-3...success.
Autofilling 5-3...success.
Autofilling 6-3...success.
Autofilling 7-1...success.
Autofilling 7-2...success.
Autofilling 7-3 (first way)...success.
Autofilling 7-3 (second way)...success.
The two ways of autofilling 7-3 agree.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[1:8,0:4].
Attempting automerge of 7-11...success.
Autofilling 2-11...success.
Autofilling 3-11...success.
Autofilling 4-11...success.
Autofilling 5-11...success.
Autofilling 6-11...success.
Autofilling 7-4...success.
Autofilling 7-5...success.
Autofilling 7-6...success.
Autofilling 7-7...success.
Autofilling 7-8...success.
Autofilling 7-9...success.
Autofilling 7-10...success.
Autofilling 7-11 (first way)...success.
Autofilling 7-11 (second way)...success.
The two ways of autofilling 7-11 agree.
Recording autofilled block MergeState('merge-dev-to-branchA', tip1='feature/branchA', tip2='develop', goal='rebase-with-history')[1:8,3:12].
Merge is complete!
如果你想要一个简单的合并作为最终结果,那么你应该设置--goal=merge
:
git-imerge start --name=merge-develop-to-A --first-parent --goal=merge develop
或者,更简单地说,
git-imerge merge develop
然后,当导入完成并且您对结果满意时,重要的是输入
git-imerge finish
,清理中间合并并将原始分支设置为指向结果。