[cairo] how to git another heads?

Carl Worth cworth at cworth.org
Thu Sep 7 09:33:08 PDT 2006


On Thu, 7 Sep 2006 11:09:29 +0800, "RuXu W." wrote:
>
> I want to to git another heads names "ps-surface".

So if you've got a git branch, (also sometimes called "heads"), named
ps-surface in your repository and you'd like to check it out, then
that is as simple as:

	git checkout ps-surface

You can see currently available branches as well as which is current,
(marked with an asterisk), with:

	git branch

As for ps-surface, that's not actually an interesting branch to
checkout. That branch exists in the central repository as something
that Keith and I were using for collaborative development. This was
something of an experiment as we had previously done short-lived
branches ("topic branches" in much of git-speak) in personal
repositories not in the central repository.

When we finished work on the branch we merged it in, (the merge commit
calls it analysis-surface which is more descriptive than
ps-surface). So now the old branch name has just been left around even
though there is no active development on it. At this point, the
ps-surface branch just indicates an arbitrary point in cairo's
history. There are no commits on that branch that are not committed to
the main line, and there is really no interesting reason to use
ps-surface as the basis for any new development.

You can see that ps-surface is all merged up and has no unique commits
with a command like this:

	git log master..ps-surface

Compare that with the other short-lived branch in the central tree
that does have a few commits on it:

	git log master..surface-internals

This branch was abandoned, (I think the equivalent changes were applied
separately to a branch that has been merged in).

Incidentally, the result of the experiment is that short-lived
branches do not work well in the central tree. When they are merged in
or discarded they stick around in the central repository, and clutter
things up. There's no simple way for users to delete these old
branches, and if I do go ahead and remove them, then people that had
cloned previously will get complaints from git when they next pull,
(until they update their .git/remotes/origin file).

So that's why these two useless branches are cluttering up the central
tree now. I'd like to delete them without having to force all the
users to manually touch up .git/remotes/origin, but I don't think that
git currently provides any means for that.

[I just checked and it looks like in the case of a disappearing
branch, git will fail to update the branches that do still exist,
(even after successfully fetching all the necessary objects). I'll go
ahead and file a bug report on that issue.]

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060907/e1178e89/attachment-0001.pgp


More information about the cairo mailing list