@@ -36,6 +36,29 @@ from `master` and copy the changes in each of those commits on top of the
36
36
D---E---F---G master
37
37
------------
38
38
39
+ If there is a merge conflict during this process, `git rebase` will stop at the
40
+ first problematic commit and leave conflict markers. If this happens, you can:
41
+
42
+ 1. Resolve the conflict. You can use `git diff` to find the markers (<<<<<<)
43
+ and make edits to resolve the conflict. For each file you edit, you need to
44
+ tell Git that the conflict has been resolved. Typically this would be
45
+ done with
46
+
47
+ git add <filename>
48
+
49
+ You can then continue the rebasing process with
50
+
51
+ git rebase --continue
52
+
53
+ 2. Stop the `git rebase` and return your branch to its original state with
54
+
55
+ git rebase --abort
56
+
57
+ 3. Skip the commit that caused the merge conflict with
58
+
59
+ git rebase --skip
60
+
61
+
39
62
If `<branch>` is specified, `git rebase` will perform an automatic
40
63
`git switch <branch>` before doing anything else. Otherwise
41
64
it remains on the current branch.
@@ -71,13 +94,6 @@ any commits in `HEAD` which introduce the same textual changes as a commit
71
94
in `HEAD..<upstream>` are omitted (i.e., a patch already accepted upstream
72
95
with a different commit message or timestamp will be skipped).
73
96
74
- It is possible that a merge failure will prevent this process from being
75
- completely automatic. You will have to resolve any such merge failure
76
- and run `git rebase --continue` . Another option is to bypass the commit
77
- that caused the merge failure with `git rebase --skip` . To check out the
78
- original `<branch>` and remove the `.git/rebase-apply` working files, use
79
- the command `git rebase --abort` instead.
80
-
81
97
If the upstream branch already contains a change you have made (e.g.,
82
98
because you mailed a patch which was applied upstream), then that commit
83
99
will be skipped and warnings will be issued (if the 'merge' backend is
@@ -180,28 +196,6 @@ This is useful if F and G were flawed in some way, or should not be
180
196
part of topicA. Note that the argument to `--onto` and the `<upstream>`
181
197
parameter can be any valid commit-ish.
182
198
183
- In case of conflict, `git rebase` will stop at the first problematic commit
184
- and leave conflict markers in the tree. You can use `git diff` to locate
185
- the markers (<<<<<<) and make edits to resolve the conflict. For each
186
- file you edit, you need to tell Git that the conflict has been resolved,
187
- typically this would be done with
188
-
189
-
190
- git add <filename>
191
-
192
-
193
- After resolving the conflict manually and updating the index with the
194
- desired resolution, you can continue the rebasing process with
195
-
196
-
197
- git rebase --continue
198
-
199
-
200
- Alternatively, you can undo the 'git rebase' with
201
-
202
-
203
- git rebase --abort
204
-
205
199
MODE OPTIONS
206
200
------------
207
201
0 commit comments