X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=Documentation%2Fgit-rebase.txt;h=b30ed352e5a3f87d24119624966c33b4c194df5a;hb=0cd993a778d7c14bed34f624fce46724242557ed;hp=147fa1a8e002daba2a465ed1f56c88838500cb53;hpb=d692d34653f74be6b16add3e993e957f33fe049b;p=~andy%2Fgit diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 147fa1a8e..b30ed352e 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -8,9 +8,9 @@ git-rebase - Forward-port local commits to the updated upstream head SYNOPSIS -------- [verse] -'git rebase' [-i | --interactive] [options] [--onto ] +'git rebase' [-i | --interactive] [options] [--exec ] [--onto ] [] [] -'git rebase' [-i | --interactive] [options] --onto +'git rebase' [-i | --interactive] [options] [--exec ] [--onto ] --root [] 'git rebase' --continue | --skip | --abort @@ -210,7 +210,7 @@ rebase.autosquash:: OPTIONS ------- -:: +--onto :: Starting point at which to create the new commits. If the --onto option is not specified, the starting point is . May be any valid commit, and not just an @@ -344,14 +344,36 @@ This uses the `--interactive` machinery internally, but combining it with the `--interactive` option explicitly is generally not a good idea unless you know what you are doing (see BUGS below). +-x :: +--exec :: + Append "exec " after each line creating a commit in the + final history. will be interpreted as one or more shell + commands. ++ +This option can only be used with the `--interactive` option +(see INTERACTIVE MODE below). ++ +You may execute several commands by either using one instance of `--exec` +with several commands: ++ + git rebase -i --exec "cmd1 && cmd2 && ..." ++ +or by giving more than one `--exec`: ++ + git rebase -i --exec "cmd1" --exec "cmd2" --exec ... ++ +If `--autosquash` is used, "exec" lines will not be appended for +the intermediate commits, and will only appear at the end of each +squash/fixup series. --root:: Rebase all commits reachable from , instead of limiting them with an . This allows you to rebase - the root commit(s) on a branch. Must be used with --onto, and + the root commit(s) on a branch. When used with --onto, it will skip changes already contained in (instead of - ). When used together with --preserve-merges, 'all' - root commits will be rewritten to have as parent + ) whereas without --onto it will operate on every change. + When used together with both --onto and --preserve-merges, + 'all' root commits will be rewritten to have as parent instead. --autosquash:: @@ -521,6 +543,24 @@ 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. +---------------------------------- +$ git rebase -i --exec "make test" +---------------------------------- + +This command lets you check that intermediate commits are compilable. +The todo list becomes like that: + +-------------------- +pick 5928aea one +exec make test +pick 04d0fda two +exec make test +pick ba46169 three +exec make test +pick f4593f9 four +exec make test +-------------------- + SPLITTING COMMITS -----------------