Code

Merge branch 'jn/doc-backslash'
[git.git] / Documentation / git-rebase.txt
index b8aa0b999ddf878823622d3884d9def81996c7ff..30e5c0eb14470a5f72174b1071eac79c55fb0c41 100644 (file)
@@ -199,6 +199,9 @@ rebase.stat::
        Whether to show a diffstat of what changed upstream since the last
        rebase. False by default.
 
+rebase.autosquash::
+       If set to true enable '--autosquash' option by default.
+
 OPTIONS
 -------
 <newbase>::
@@ -333,6 +336,7 @@ idea unless you know what you are doing (see BUGS below).
        instead.
 
 --autosquash::
+--no-autosquash::
        When the commit log message begins with "squash! ..." (or
        "fixup! ..."), and there is a commit whose title begins with
        the same ..., automatically modify the todo list of rebase -i
@@ -341,6 +345,10 @@ idea unless you know what you are doing (see BUGS below).
        commit from `pick` to `squash` (or `fixup`).
 +
 This option is only valid when the '--interactive' option is used.
++
+If the '--autosquash' option is enabled by default using the
+configuration variable `rebase.autosquash`, this option can be
+used to override and disable this setting.
 
 --no-ff::
        With --interactive, cherry-pick all rebased commits instead of
@@ -466,6 +474,30 @@ sure that the current HEAD is "B", and call
 $ git rebase -i -p --onto Q O
 -----------------------------
 
+Reordering and editing commits usually creates untested intermediate
+steps.  You may want to check that your history editing did not break
+anything by running a test, or at least recompiling at intermediate
+points in history by using the "exec" command (shortcut "x").  You may
+do so by creating a todo list like this one:
+
+-------------------------------------------
+pick deadbee Implement feature XXX
+fixup f1a5c00 Fix to feature XXX
+exec make
+pick c0ffeee The oneline of the next commit
+edit deadbab The oneline of the commit after
+exec cd subdir; make test
+...
+-------------------------------------------
+
+The interactive rebase will stop when a command fails (i.e. exits with
+non-0 status) to give you an opportunity to fix the problem. You can
+continue with `git rebase --continue`.
+
+The "exec" command launches the command in a shell (the one specified
+in `$SHELL`, or the default shell if `$SHELL` is not set), so you can
+use shell features (like "cd", ">", ";" ...). The command is run from
+the root of the working tree.
 
 SPLITTING COMMITS
 -----------------