Skip to content

Add link to the mentioned figer 28 #1194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion book/03-git-branching/sections/rebasing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ image::images/basic-rebase-1.png[Simple divergent history.]
The easiest way to integrate the branches, as we've already covered, is the `merge` command.
It performs a three-way merge between the two latest branch snapshots (`C3` and `C4`) and the most recent common ancestor of the two (`C2`), creating a new snapshot (and commit).

[[rebasing-merging-example]]
.Merging to integrate diverged work history
image::images/basic-rebase-2.png[Merging to integrate diverged work history.]

Expand Down Expand Up @@ -48,7 +49,7 @@ $ git merge experiment
.Fast-forwarding the master branch
image::images/basic-rebase-4.png[Fast-forwarding the master branch.]

Now, the snapshot pointed to by `C4'` is exactly the same as the one that was pointed to by `C5` in the merge example.
Now, the snapshot pointed to by `C4'` is exactly the same as the one that was pointed to by `C5` in <<rebasing-merging-example,the merge example>>.
There is no difference in the end product of the integration, but rebasing makes for a cleaner history.
If you examine the log of a rebased branch, it looks like a linear history: it appears that all the work happened in series, even when it originally happened in parallel.

Expand Down