@@ -16,6 +16,26 @@ SYNOPSIS
16
16
17
17
DESCRIPTION
18
18
-----------
19
+ Transplant a series of commits onto a different starting point.
20
+
21
+ For example, assume the following history exists and the current branch is `topic` :
22
+
23
+ ------------
24
+ A---B---C topic
25
+ /
26
+ D---E---F---G master
27
+ ------------
28
+
29
+ Then `git rebase master` will find all of the commits since `topic` diverged
30
+ from `master` and copy the changes in each of those commits on top of the
31
+ `master` branch.
32
+
33
+ ------------
34
+ A'--B'--C' topic
35
+ /
36
+ D---E---F---G master
37
+ ------------
38
+
19
39
If `<branch>` is specified, `git rebase` will perform an automatic
20
40
`git switch <branch>` before doing anything else. Otherwise
21
41
it remains on the current branch.
@@ -58,32 +78,6 @@ that caused the merge failure with `git rebase --skip`. To check out the
58
78
original `<branch>` and remove the `.git/rebase-apply` working files, use
59
79
the command `git rebase --abort` instead.
60
80
61
- Assume the following history exists and the current branch is "topic":
62
-
63
- ------------
64
- A---B---C topic
65
- /
66
- D---E---F---G master
67
- ------------
68
-
69
- From this point, the result of either of the following commands:
70
-
71
-
72
- git rebase master
73
- git rebase master topic
74
-
75
- would be:
76
-
77
- ------------
78
- A'--B'--C' topic
79
- /
80
- D---E---F---G master
81
- ------------
82
-
83
- *NOTE:* The latter form is just a short-hand of `git checkout topic`
84
- followed by `git rebase master`. When rebase exits `topic` will
85
- remain the checked-out branch.
86
-
87
81
If the upstream branch already contains a change you have made (e.g.,
88
82
because you mailed a patch which was applied upstream), then that commit
89
83
will be skipped and warnings will be issued (if the 'merge' backend is
0 commit comments