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 <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Feb 17, 2007 at 04:31 UTC
5ca2db53763ed93a75de7ddbda753fc09327d7aa
1 file changed
+14
-8
Documentation/git-rebase.txt
+14
-8
@@ -13,11 +13,20 @@ SYNOPSIS
13
14
DESCRIPTION
15
-----------
16
-git-rebase replaces <branch> with a new branch of the same name. When
17
-the --onto option is provided the new branch starts out with a HEAD equal
18
-to <newbase>, otherwise it is equal to <upstream>. It then attempts to
19
-create a new commit for each commit from the original <branch> that does
20
-not exist in the <upstream> branch.
16
+If <branch> is specified, git-rebase will perform an automatic
17
+`git checkout <branch>` before doing anything else. Otherwise
18
+it remains on the current branch.
19
+
20
+All changes made by commits in the current branch but that are not
21
+in <upstream> are saved to a temporary area. This is the same set
22
+of commits that would be shown by `git log <upstream>..HEAD`.
23
+
24
+The current branch is reset to <upstream>, or <newbase> if the
25
+--onto option was supplied. This has the exact same effect as
26
+`git reset --hard <upstream>` (or <newbase>).
27
+
28
+The commits that were previously saved into the temporary area are
29
+then reapplied to the current branch, one by one, in order.
30
31
It is possible that a merge failure will prevent this process from being
32
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
35
original <branch> and remove the .dotest working files, use the command
36
`git rebase --abort` instead.
37
29
-Note that if <branch> is not specified on the command line, the currently
30
-checked out branch is used.
31
-
38
Assume the following history exists and the current branch is "topic":
39
40
------------