11
'git rebase' [-i | --interactive] [options] [--onto <newbase>]
11
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
12
12
[<upstream>] [<branch>]
13
'git rebase' [-i | --interactive] [options] --onto <newbase>
13
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
15
'git rebase' --continue | --skip | --abort
15
'git rebase' --continue | --skip | --abort | --edit-todo
179
179
In case of conflict, 'git rebase' will stop at the first problematic commit
180
180
and leave conflict markers in the tree. You can use 'git diff' to locate
181
181
the markers (<<<<<<) and make edits to resolve the conflict. For each
182
file you edit, you need to tell git that the conflict has been resolved,
182
file you edit, you need to tell Git that the conflict has been resolved,
183
183
typically this would be done with
238
238
will be reset to where it was when the rebase operation was
242
Keep the commits that do not change anything from its
243
parents in the result.
242
246
Restart the rebasing process by skipping the current patch.
249
Edit the todo list during an interactive rebase.
246
253
Use merging strategies to rebase. When the recursive (default) merge
269
276
Pass the <strategy-option> through to the merge strategy.
270
277
This implies `--merge` and, if no strategy has been
271
278
specified, `-s recursive`. Note the reversal of 'ours' and
272
'theirs' as noted in above for the `-m` option.
279
'theirs' as noted above for the `-m` option.
340
347
with the `--interactive` option explicitly is generally not a good
341
348
idea unless you know what you are doing (see BUGS below).
352
Append "exec <cmd>" after each line creating a commit in the
353
final history. <cmd> will be interpreted as one or more shell
356
This option can only be used with the `--interactive` option
357
(see INTERACTIVE MODE below).
359
You may execute several commands by either using one instance of `--exec`
360
with several commands:
362
git rebase -i --exec "cmd1 && cmd2 && ..."
364
or by giving more than one `--exec`:
366
git rebase -i --exec "cmd1" --exec "cmd2" --exec ...
368
If `--autosquash` is used, "exec" lines will not be appended for
369
the intermediate commits, and will only appear at the end of each
345
373
Rebase all commits reachable from <branch>, instead of
346
374
limiting them with an <upstream>. This allows you to rebase
347
the root commit(s) on a branch. Must be used with --onto, and
375
the root commit(s) on a branch. When used with --onto, it
348
376
will skip changes already contained in <newbase> (instead of
349
<upstream>). When used together with --preserve-merges, 'all'
350
root commits will be rewritten to have <newbase> as parent
377
<upstream>) whereas without --onto it will operate on every change.
378
When used together with both --onto and --preserve-merges,
379
'all' root commits will be rewritten to have <newbase> as parent
517
546
use shell features (like "cd", ">", ";" ...). The command is run from
518
547
the root of the working tree.
549
----------------------------------
550
$ git rebase -i --exec "make test"
551
----------------------------------
553
This command lets you check that intermediate commits are compilable.
554
The todo list becomes like that:
520
567
SPLITTING COMMITS
521
568
-----------------