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