$ git rebase temp
First, rewinding head to replay your work on top of it...
Applying: <git comment>
Using index info to reconstruct a base tree...
M pom.xml
.git/rebase-apply/patch:10: trailing whitespace.
<some code>
.git/rebase-apply/patch:17: trailing whitespace.
<some other code>
warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging pom.xml
CONFLICT (content): Merge conflict in pom.xml
error: Failed to merge in the changes.
Patch failed at 0001 <git comment>
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
A --- B --- C --- D --- E master
\
\-- X --- Y --- Z feature
<李> < p > git rebase --onto D A feature < br >
将apply提交B, C, X, Y, Z来提交D,并最终跳过B和C,因为它们已经被应用。
<李> < p > git rebase --onto C X feature < br >
将apply提交Y和Z来提交C,有效地删除提交X