Information Technology Reference
In-Depth Information
Figure 10-9
.
The repositories after Sarah's successful $ git push origin master command
Now John wants to send his work to
shared-repo
with:
# john's command
$ git push origin master
Git refuses to push his commits because
johns-repo
was out of date. The output
of the above command contains the following message:
! [rejected]
master -> master (fetch first)
Git informs John that his push was rejected and that he has to fetch the missing revi-
sions first. To update his local
master
branch, John runs the following command:
# john's command
$ git pull origin master
The pull command fetched Sarah's
b3
revision and performed a merge operation.
Now the repositories look like
Figure 10-10
.