X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-rebase.txt;h=823f2a4638c5b53671e294faf7a99a56d17c897a;hb=6f6bee3ba9260137f27bdcad2f8d0fac026f2b6d;hp=da3c38cd60dc0d143fe91417b742335cfff27809;hpb=c5034673fd92b6278e6c9d55683770ec01fafc89;p=git.git diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index da3c38cd6..823f2a463 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -17,7 +17,7 @@ SYNOPSIS DESCRIPTION ----------- -If is specified, 'git-rebase' will perform an automatic +If is specified, 'git rebase' will perform an automatic `git checkout ` before doing anything else. Otherwise it remains on the current branch. @@ -170,8 +170,8 @@ This is useful if F and G were flawed in some way, or should not be part of topicA. Note that the argument to --onto and the parameter can be any valid commit-ish. -In case of conflict, 'git-rebase' will stop at the first problematic commit -and leave conflict markers in the tree. You can use 'git-diff' to locate +In case of conflict, 'git rebase' will stop at the first problematic commit +and leave conflict markers in the tree. You can use 'git diff' to locate the markers (<<<<<<) and make edits to resolve the conflict. For each file you edit, you need to tell git that the conflict has been resolved, typically this would be done with @@ -187,11 +187,18 @@ desired resolution, you can continue the rebasing process with git rebase --continue -Alternatively, you can undo the 'git-rebase' with +Alternatively, you can undo the 'git rebase' with git rebase --abort +CONFIGURATION +------------- + +rebase.stat:: + Whether to show a diffstat of what changed upstream since the last + rebase. False by default. + OPTIONS ------- :: @@ -221,18 +228,39 @@ OPTIONS Use merging strategies to rebase. When the recursive (default) merge strategy is used, this allows rebase to be aware of renames on the upstream side. ++ +Note that a rebase merge works by replaying each commit from the working +branch on top of the branch. Because of this, when a merge +conflict happens, the side reported as 'ours' is the so-far rebased +series, starting with , and 'theirs' is the working branch. In +other words, the sides are swapped. -s :: --strategy=:: - Use the given merge strategy; can be supplied more than - once to specify them in the order they should be tried. - If there is no `-s` option, a built-in list of strategies - is used instead ('git-merge-recursive' when merging a single - head, 'git-merge-octopus' otherwise). This implies --merge. + Use the given merge strategy. + If there is no `-s` option 'git merge-recursive' is used + instead. This implies --merge. ++ +Because 'git rebase' replays each commit from the working branch +on top of the branch using the given strategy, using +the 'ours' strategy simply discards all patches from the , +which makes little sense. + +-q:: +--quiet:: + Be quiet. Implies --no-stat. -v:: --verbose:: - Display a diffstat of what changed upstream since the last rebase. + Be verbose. Implies --stat. + +--stat:: + Show a diffstat of what changed upstream since the last rebase. The + diffstat is also controlled by the configuration option rebase.stat. + +-n:: +--no-stat:: + Do not show a diffstat as part of the rebase process. --no-verify:: This option bypasses the pre-rebase hook. See also linkgit:githooks[5]. @@ -243,11 +271,24 @@ OPTIONS context exist they all must match. By default no context is ever ignored. +-f:: +--force-rebase:: + Force the rebase even if the current branch is a descendant + of the commit you are rebasing onto. Normally the command will + exit with the message "Current branch is up to date" in such a + situation. + +--ignore-whitespace:: --whitespace=