From: Shawn O. Pearce Date: Sat, 17 Feb 2007 09:31:50 +0000 (-0500) Subject: Attempt to improve git-rebase lead-in description. X-Git-Tag: v1.5.0.1~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ca2db53763ed93a75de7ddbda753fc09327d7aa;p=git.git Attempt to improve git-rebase lead-in description. It was mentioned on #git this morning that the lead-in description of git-rebase is very confusing. Too many branch this and branch that in a very short run of text. This new description attempts to walk the user through the command syntax, while also describing exactly what git-rebase is doing to their repository. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f2ef1f7dc..a66b2d73c 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -13,11 +13,20 @@ SYNOPSIS DESCRIPTION ----------- -git-rebase replaces with a new branch of the same name. When -the --onto option is provided the new branch starts out with a HEAD equal -to , otherwise it is equal to . It then attempts to -create a new commit for each commit from the original that does -not exist in the branch. +If is specified, git-rebase will perform an automatic +`git checkout ` before doing anything else. Otherwise +it remains on the current branch. + +All changes made by commits in the current branch but that are not +in are saved to a temporary area. This is the same set +of commits that would be shown by `git log ..HEAD`. + +The current branch is reset to , or if the +--onto option was supplied. This has the exact same effect as +`git reset --hard ` (or ). + +The commits that were previously saved into the temporary area are +then reapplied to the current branch, one by one, in order. It is possible that a merge failure will prevent this process from being completely automatic. You will have to resolve any such merge failure @@ -26,9 +35,6 @@ that caused the merge failure with `git rebase --skip`. To restore the original and remove the .dotest working files, use the command `git rebase --abort` instead. -Note that if is not specified on the command line, the currently -checked out branch is used. - Assume the following history exists and the current branch is "topic": ------------