Information Technology Reference
In-Depth Information
Next, John wants to start the work on a specific unit test. He creates an ordinary loc-
al branch named
test
:
# john's command
$ git branch test
He is aware that this name may already be in use by many team members for their
own private work that not related to unit tests in any way. Therefore John decides that
the remote branch should be named
special-unit-tests
. He pushes his local
test
branch under the name
special-unit-tests
with the following command:
# john's command
$ git push -u origin test:special-unit-test
The above command creates a remote branch named
special-unit-test
in
the remote repository aliased by
origin
. Check it with:
# shared-repo's command
$ git branch
Let's suppose that Sarah is assigned to work on documentation and tests. She
fetches from the remote with:
# sarah's command
$ git fetch
This command creates remote tracking branches
origin/doc
and
origin/
special-unit-tests
in
sarahs-repo
.
Some time has passed and the work in the
doc
and
special-unit-tests
re-
mote branches has passed smoothly. The members used Recipe 10-4 to synchronize
their work.
John downloaded the most recent revisions from
doc
branch. He decides that the
group work is finished. The remote
doc
branch should be deleted. John deletes remote
doc
branch with:
# john's command
$ git push origin :doc