Information Technology Reference
In-Depth Information
# john's command
$ git rebase
Now the
sarah
branch in John's repository contains
s1
and
s2
revisions. John can
analyze Sarah's contributions. When he decides that these modifications are okay, he
can merge them into his own work with:
# john's commands
$ git checkout master
$ git rebase sarah
Now it is time for John to author some more revisions. He runs
$ git simple-
commit j4 j5 j6
. Then he emails Sarah about his work.
It's Sarah's turn to download the code contributed by John in revisions
j4
,
j5
, and
j6
. She began her work with the
$ git clone
command, thus her repository
already contains the
.git/config
entry that sets her
master
branch as the local
tracking branch for
origin/master
remote tracking branch. You can check it with
$ git branch -a -vv
command. It outputs:
* master 40695ac [origin/master] s2
remotes/origin/master 604549f j3
The fragment
[origin/master]
says that the
master
branch is a local track-
ing branch for
origin/master
remote tracking branch. To remove this relation
Sarah runs:
# sarah's command
$ git config --unset branch.master.remote
$ git config --unset branch.master.merge
After the above commands the
$ git branch -a -vv
outputs:
* master 40695ac s2
remotes/origin/master 604549f j3
Although her repository still contains the remote tracking branch named
origin/
master
, her local
master
branch is not connected with it. The two
$ git con-