~ubuntu-branches/debian/sid/git/sid

« back to all changes in this revision

Viewing changes to Documentation/git-rebase.txt

  • Committer: Package Import Robot
  • Author(s): Jonathan Nieder
  • Date: 2013-06-12 07:50:53 UTC
  • mfrom: (1.2.19) (2.1.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130612075053-uue9xe0dq0rvm44y
Tags: 1:1.8.3.1-1
* merge branch debian-experimental
* new upstream point release (see RelNotes/1.8.3.1.txt).
* debian/watch: use xz-compressed tarballs from kernel.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
SYNOPSIS
9
9
--------
10
10
[verse]
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>]
14
14
        --root [<branch>]
15
 
'git rebase' --continue | --skip | --abort
 
15
'git rebase' --continue | --skip | --abort | --edit-todo
16
16
 
17
17
DESCRIPTION
18
18
-----------
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
184
184
 
185
185
 
210
210
 
211
211
OPTIONS
212
212
-------
213
 
<newbase>::
 
213
--onto <newbase>::
214
214
        Starting point at which to create the new commits. If the
215
215
        --onto option is not specified, the starting point is
216
216
        <upstream>.  May be any valid commit, and not just an
238
238
        will be reset to where it was when the rebase operation was
239
239
        started.
240
240
 
 
241
--keep-empty::
 
242
        Keep the commits that do not change anything from its
 
243
        parents in the result.
 
244
 
241
245
--skip::
242
246
        Restart the rebasing process by skipping the current patch.
243
247
 
 
248
--edit-todo::
 
249
        Edit the todo list during an interactive rebase.
 
250
 
244
251
-m::
245
252
--merge::
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.
273
280
 
274
281
-q::
275
282
--quiet::
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).
342
349
 
 
350
-x <cmd>::
 
351
--exec <cmd>::
 
352
        Append "exec <cmd>" after each line creating a commit in the
 
353
        final history. <cmd> will be interpreted as one or more shell
 
354
        commands.
 
355
+
 
356
This option can only be used with the `--interactive` option
 
357
(see INTERACTIVE MODE below).
 
358
+
 
359
You may execute several commands by either using one instance of `--exec`
 
360
with several commands:
 
361
+
 
362
        git rebase -i --exec "cmd1 && cmd2 && ..."
 
363
+
 
364
or by giving more than one `--exec`:
 
365
+
 
366
        git rebase -i --exec "cmd1" --exec "cmd2" --exec ...
 
367
+
 
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
 
370
squash/fixup series.
343
371
 
344
372
--root::
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
351
380
        instead.
352
381
 
353
382
--autosquash::
517
546
use shell features (like "cd", ">", ";" ...). The command is run from
518
547
the root of the working tree.
519
548
 
 
549
----------------------------------
 
550
$ git rebase -i --exec "make test"
 
551
----------------------------------
 
552
 
 
553
This command lets you check that intermediate commits are compilable.
 
554
The todo list becomes like that:
 
555
 
 
556
--------------------
 
557
pick 5928aea one
 
558
exec make test
 
559
pick 04d0fda two
 
560
exec make test
 
561
pick ba46169 three
 
562
exec make test
 
563
pick f4593f9 four
 
564
exec make test
 
565
--------------------
 
566
 
520
567
SPLITTING COMMITS
521
568
-----------------
522
569