Skip to content

Commit 3a0cf27

Browse files
committed
Minor tweaks/grammar/dashes/rewording to "Rerere".
1 parent 99dc02f commit 3a0cf27

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

book/07-git-tools/sections/rerere.asc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
=== Rerere
33

44
The `git rerere` functionality is a bit of a hidden feature.
5-
The name stands for ``reuse recorded resolution'' and as the name implies, it allows you to ask Git to remember how you've resolved a hunk conflict so that the next time it sees the same conflict, Git can automatically resolve it for you.
5+
The name stands for ``reuse recorded resolution'' and, as the name implies, it allows you to ask Git to remember how you've resolved a hunk conflict so that the next time it sees the same conflict, Git can resolve it for you automatically.
66

77
There are a number of scenarios in which this functionality might be really handy.
8-
One of the examples that is mentioned in the documentation is if you want to make sure a long lived topic branch will merge cleanly but don't want to have a bunch of intermediate merge commits.
9-
With `rerere` turned on you can merge occasionally, resolve the conflicts, then back out the merge.
8+
One of the examples that is mentioned in the documentation is when you want to make sure a long-lived topic branch will ultimately merge cleanly, but you don't want to have a bunch of intermediate merge commits cluttering up your commit history.
9+
With `rerere` enabled, you can attempt the occasional merge, resolve the conflicts, then back out of the merge.
1010
If you do this continuously, then the final merge should be easy because `rerere` can just do everything for you automatically.
1111

1212
This same tactic can be used if you want to keep a branch rebased so you don't have to deal with the same rebasing conflicts each time you do it.
13-
Or if you want to take a branch that you merged and fixed a bunch of conflicts and then decide to rebase it instead - you likely won't have to do all the same conflicts again.
13+
Or if you want to take a branch that you merged and fixed a bunch of conflicts and then decide to rebase it instead -- you likely won't have to do all the same conflicts again.
1414

15-
Another situation is where you merge a bunch of evolving topic branches together into a testable head occasionally, as the Git project itself often does.
15+
Another application of `rerere` is where you merge a bunch of evolving topic branches together into a testable head occasionally, as the Git project itself often does.
1616
If the tests fail, you can rewind the merges and re-do them without the topic branch that made the tests fail without having to re-resolve the conflicts again.
1717

18-
To enable the `rerere` functionality, you simply have to run this config setting:
18+
To enable `rerere` functionality, you simply have to run this config setting:
1919

2020
[source,console]
2121
----
2222
$ git config --global rerere.enabled true
2323
----
2424

25-
You can also turn it on by creating the `.git/rr-cache` directory in a specific repository, but the config setting is clearer and it can be done globally.
25+
You can also turn it on by creating the `.git/rr-cache` directory in a specific repository, but the config setting is clearer and enables that feature globally for you.
2626

2727
Now let's see a simple example, similar to our previous one.
2828
Let's say we have a file named `hello.rb` that looks like this:
@@ -76,7 +76,7 @@ $ git rerere status
7676
hello.rb
7777
----
7878

79-
And `git rerere diff` will show the current state of the resolution - what you started with to resolve and what you've resolved it to.
79+
And `git rerere diff` will show the current state of the resolution -- what you started with to resolve and what you've resolved it to.
8080

8181
[source,console]
8282
----
@@ -99,7 +99,7 @@ $ git rerere diff
9999
end
100100
----
101101

102-
Also (and this isn't really related to `rerere`), you can use `ls-files -u` to see the conflicted files and the before, left and right versions:
102+
Also (and this isn't really related to `rerere`), you can use `git ls-files -u` to see the conflicted files and the before, left and right versions:
103103

104104
[source,console]
105105
----
@@ -109,7 +109,7 @@ $ git ls-files -u
109109
100644 54336ba847c3758ab604876419607e9443848474 3 hello.rb
110110
----
111111

112-
Now you can resolve it to just be `puts 'hola mundo'` and you can run the `rerere diff` command again to see what rerere will remember:
112+
Now you can resolve it to just be `puts 'hola mundo'` and you can run `git rerere diff` again to see what rerere will remember:
113113

114114
[source,console]
115115
----
@@ -146,7 +146,7 @@ You can see that it "Recorded resolution for FILE".
146146
image::images/rerere2.png[]
147147

148148
Now, let's undo that merge and then rebase it on top of our master branch instead.
149-
We can move our branch back by using `reset` as we saw in <<_git_reset>>.
149+
We can move our branch back by using `git reset` as we saw in <<_git_reset>>.
150150

151151
[source,console]
152152
----
@@ -207,7 +207,7 @@ index a440db6,54336ba..0000000
207207

208208
image::images/rerere3.png[]
209209

210-
You can also recreate the conflicted file state with the `checkout` command:
210+
You can also recreate the conflicted file state with `git checkout`:
211211

212212
[source,console]
213213
----
@@ -225,7 +225,7 @@ end
225225
----
226226

227227
We saw an example of this in <<_advanced_merging>>.
228-
For now though, let's re-resolve it by just running `rerere` again:
228+
For now though, let's re-resolve it by just running `git rerere` again:
229229

230230
[source,console]
231231
----

0 commit comments

Comments
 (0)