Information Technology Reference
In-Depth Information
printed because Mark's
master
branch misses the three revisions included in his
origin/master
branch.
Using
$ git log --graph --all --oneline --decorate
Mark can
visualize that his
master
branch and his
origin/master
branch diverged. The
state of Mark's repository and the shared repositories is presented in
Figure 10-23
.
Figure 10-23
.
The state of Mark's repo after $ git fetch origin
To keep the history linear Mark rebases his
master
branch on top of his
origin/
master
branch fetched from shared repository:
# command issued in marks-repo
$ git rebase origin/master master
Now the history of Mark's
master
branch is linear and his rebased revisions
m1'
,
m2'
, and
m3'
are on top. Mark wants to be sure so he runs either the
$ git log -
-graph --oneline --decorate
or
$ gitk --all &
command. The state
of the repositories is shown in
Figure 10-24
.