Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hi,

This is a proposal how to handle the feature and release branches in the
LibreOffice git repos.

Terms
-----

"Release branch" - branch that is used for a release of a version, like
when we start stabilizing 3.3, we'll create libreoffice-3-3 branch, and
only fixes targeting 3.3 are supposed to go there.

"Feature branch" - branch used for development of a larger feature,
rework, or a bugfix, that needs a stable repo for a while, and not tons
of commits floating in every few minutes.

Layout
------

Release branches are trivial - they must be in the main repo.  The
feature branches (in principle) do not have to be - they can be handled
in 'personal repositories' on freedesktop, see

http://www.freedesktop.org/wiki/Infrastructure/git/RepositoryAdmin

Nevertheless, there was agreement on the IRC that we will allow feature
branches even in the main repos; but in that case, they have to be
prefixed with 'feature/' prefix.  Also, the creator of the branch is
supposed to remove it when it is merged into master (or into a release
branch).  Release branches have no prefix.

So, the list of the branches could look like the following:

feature/comments-rework
...
feature/something-removal
feature/supermegafeature
libreoffice-3-3
libreoffice-4
master

Merging a feature branch
------------------------

When you want to merge a feature branch into the master, you have 2
possibilities - either rebase it over the current master, or merge it.
The former gets us a nicer history (less merges), but more work on your
side.  On the other hand, the latter is safer (and easier) when the
feature branch was open for quite some time, and lots of work has been
done there.

So, after having done a 'g checkout master', you want to do:

bin/g rebase master feature/yourbranch

or

bin/g merge feature/yourbranch

Note: When you decide for merge, and your push fails, you _have_to_ use

bin/g pull --no-rebase

to get the latest changes, because with 'g pull -r' you'd fallback to
the former possibility - rebase.

Even though we encourage 'git pull -r' policy for single commits, merge
of the feature branches is the recommended way; we have to do full
merges in case of the integrating the OOo milestones anyway.

Removal of the feature branch
-----------------------------

When integrated, you remove the feature branch by

bin/g -f push :feature/yourbranch

[The -f is not necessary if the branch is present in all the repos.]

I hope this works for everyone :-) - please comment if not.

Regards,
Kendy


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.