Skip to content

Commit c94a240

Browse files
committed
Rewrite rebase vs merge analogy
Closes #351
1 parent 58e65f7 commit c94a240

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

book/03-git-branching/sections/rebasing.asc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ So what if there was a messy series of merge commits?
228228
That's how it happened, and the repository should preserve that for posterity.
229229

230230
The opposing point of view is that the commit history is the *story of how your project was made.*
231-
You wouldn't publish the first draft of a book, and the manual for how to maintain your software deserves careful editing.
232-
This is the camp that uses tools like `rebase` and `filter-branch` to tell the story in the way that's best for future readers.
231+
You wouldn't publish the first draft of a book, so why show your messy work?
232+
Remember, you are likely to need this history yourself, when fixing a bug, or figuring out why you made a particular change.
233+
People in this camp clean up their commit(s) and commit messages, before the work is merged/rebased into the mainline branch.
234+
They use tools like `rebase` and `filter-branch`, to tell the story in the way that's best for future readers.
233235

234236
Now, to the question of whether merging or rebasing is better: hopefully you'll see that it's not that simple.
235237
Git is a powerful tool, and allows you to do many things to and with your history, but every team and every project is different.

0 commit comments

Comments
 (0)