Information Technology Reference
In-Depth Information
Mark's local branches. They have not updated as of yet. Mark's repository and shared
repository now look like Figure 10-22 . Mark doesn't have John's revisions j1 , j2 , and
j3 in his repository.
Figure 10-22 . John has successfully pushed his j1, j2, j3 revisions to the shared repo and therefore Mark can not
push his m1, m2 revisions
Mark wants to push his work with:
# command issued in marks-repo
$ git push -u origin master
but this operation is rejected because the push is not a fast-forward.
Mark needs to update his master branch. He first fetches the latest revisions from
the shared repository:
# command issued in marks-repo
$ git fetch origin
To check the state of his repository Mark runs the $ git status -sb com-
mand. It prints:
## master...origin/master [ahead 2, behind 3]
Now Mark knows that his master and origin/master master branches have
diverged. The [ahead 2] informs him that Marks's master branch contains two
revisions that are not included in his origin/master branch. The [behind 3] is
 
 
Search WWH ::




Custom Search