@@ -12,15 +12,15 @@ SYNOPSIS
12
12
DESCRIPTION
13
13
-----------
14
14
15
- In a workflow that employs relatively long lived topic branches,
16
- the developer sometimes needs to resolve the same conflict over
15
+ In a workflow employing relatively long lived topic branches,
16
+ the developer sometimes needs to resolve the same conflicts over
17
17
and over again until the topic branches are done (either merged
18
18
to the "release" branch, or sent out and accepted upstream).
19
19
20
- This command helps this process by recording conflicted
21
- automerge results and corresponding hand- resolve results on the
22
- initial manual merge, and later by noticing the same automerge
23
- results and applying the previously recorded hand resolution .
20
+ This command assists the developer in this process by recording
21
+ conflicted automerge results and corresponding hand resolve results
22
+ on the initial manual merge, and applying previously recorded
23
+ hand resolutions to their corresponding automerge results .
24
24
25
25
[NOTE]
26
26
You need to set the configuration variable rerere.enabled to
@@ -54,18 +54,18 @@ for resolutions.
54
54
55
55
'gc'::
56
56
57
- This command is used to prune records of conflicted merge that
58
- occurred long time ago. By default, conflicts older than 15
59
- days that you have not recorded their resolution, and conflicts
60
- older than 60 days, are pruned. These are controlled with
57
+ This prunes records of conflicted merges that
58
+ occurred a long time ago. By default, unresolved conflicts older
59
+ than 15 days and resolved conflicts older than 60
60
+ days are pruned. These defaults are controlled via the
61
61
`gc.rerereunresolved` and `gc.rerereresolved` configuration
62
- variables.
62
+ variables respectively .
63
63
64
64
65
65
DISCUSSION
66
66
----------
67
67
68
- When your topic branch modifies overlapping area that your
68
+ When your topic branch modifies an overlapping area that your
69
69
master branch (or upstream) touched since your topic branch
70
70
forked from it, you may want to test it with the latest master,
71
71
even before your topic branch is ready to be pushed upstream:
@@ -140,43 +140,42 @@ top of the tip before the test merge:
140
140
This would leave only one merge commit when your topic branch is
141
141
finally ready and merged into the master branch. This merge
142
142
would require you to resolve the conflict, introduced by the
143
- commits marked with `*`. However, often this conflict is the
143
+ commits marked with `*`. However, this conflict is often the
144
144
same conflict you resolved when you created the test merge you
145
- blew away. 'git-rerere' command helps you to resolve this final
145
+ blew away. 'git-rerere' helps you resolve this final
146
146
conflicted merge using the information from your earlier hand
147
147
resolve.
148
148
149
149
Running the 'git-rerere' command immediately after a conflicted
150
150
automerge records the conflicted working tree files, with the
151
151
usual conflict markers `<<<<<<<`, `=======`, and `>>>>>>>` in
152
152
them. Later, after you are done resolving the conflicts,
153
- running 'git-rerere' again records the resolved state of these
153
+ running 'git-rerere' again will record the resolved state of these
154
154
files. Suppose you did this when you created the test merge of
155
155
master into the topic branch.
156
156
157
- Next time, running 'git-rerere' after seeing a conflicted
158
- automerge, if the conflict is the same as the earlier one
159
- recorded, it is noticed and a three-way merge between the
157
+ Next time, after seeing the same conflicted automerge,
158
+ running 'git-rerere' will perform a three-way merge between the
160
159
earlier conflicted automerge, the earlier manual resolution, and
161
- the current conflicted automerge is performed by the command .
160
+ the current conflicted automerge.
162
161
If this three-way merge resolves cleanly, the result is written
163
- out to your working tree file, so you would not have to manually
162
+ out to your working tree file, so you do not have to manually
164
163
resolve it. Note that 'git-rerere' leaves the index file alone,
165
164
so you still need to do the final sanity checks with `git diff`
166
165
(or `git diff -c`) and 'git-add' when you are satisfied.
167
166
168
167
As a convenience measure, 'git-merge' automatically invokes
169
- 'git-rerere' when it exits with a failed automerge, which
170
- records it if it is a new conflict, or reuses the earlier hand
168
+ 'git-rerere' upon exiting with a failed automerge and 'git-rerere'
169
+ records the hand resolve when it is a new conflict, or reuses the earlier hand
171
170
resolve when it is not. 'git-commit' also invokes 'git-rerere'
172
- when recording a merge result. What this means is that you do
173
- not have to do anything special yourself (Note: you still have
174
- to set the config variable rerere.enabled to enable this command ).
171
+ when committing a merge result. What this means is that you do
172
+ not have to do anything special yourself (besides enabling
173
+ the rerere.enabled config variable ).
175
174
176
- In our example, when you did the test merge, the manual
175
+ In our example, when you do the test merge, the manual
177
176
resolution is recorded, and it will be reused when you do the
178
- actual merge later with updated master and topic branch, as long
179
- as the earlier resolution is still applicable.
177
+ actual merge later with the updated master and topic branch, as long
178
+ as the recorded resolution is still applicable.
180
179
181
180
The information 'git-rerere' records is also used when running
182
181
'git-rebase'. After blowing away the test merge and continuing
@@ -194,11 +193,11 @@ development on the topic branch:
194
193
o---o---o---*---o---o---o---o master
195
194
------------
196
195
197
- you could run `git rebase master topic`, to keep yourself
198
- up-to-date even before your topic is ready to be sent upstream.
199
- This would result in falling back to three-way merge, and it
200
- would conflict the same way the test merge you resolved earlier.
201
- 'git-rerere' is run by 'git-rebase' to help you resolve this
196
+ you could run `git rebase master topic`, to bring yourself
197
+ up-to-date before your topic is ready to be sent upstream.
198
+ This would result in falling back to a three-way merge, and it
199
+ would conflict the same way as the test merge you resolved earlier.
200
+ 'git-rerere' will be run by 'git-rebase' to help you resolve this
202
201
conflict.
203
202
204
203
0 commit comments