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


Hi Caolan,

On 2010-10-08 at 14:18 +0100, Caolán McNamara wrote:

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.

git foo hurts my head, I at least could do with a step by step example
of a recommended way to set up and pushing to a feature branch

Oh - sorry!

So the example workflow might look like the following:

# create the branch locally
g checkout -b mybranch
# develop something
...
g commit -a
...
g commit

# find out that it might be useful as a feature branch
g -f push origin mybranch:feature/some-comprehensible-name
# continue development and pushing
...
g commit -a
g push
# hmm, a conflict, somebody pushed to our
# feature/some-comprehensible-name branch, we want to get newest stuff
# from there.  In this case, we want the 'rebasing' pull.
g pull -r
g push

# at some stage you might find out that you actually want to merge newer
# stuff from some other branch, eg. master
g merge master

# finally you want to get it all back to master
g checkout master
g merge mybranch
g push
# if it failed, we need to get the newest stuff from the remote repo
# BUT WITHOUT REBASING
g pull --no-rebase
g push

# everything finished, kill the remote branch
g -f push origin :feature/some-comphrehensible-name

[In some cases, you might need to use 'g -f' instead of just 'g'.  The
-f forces 'g' to operate on all the repos, and I am afraid the logic to
detect when to operate on all the repos might be still not perfect.]

I'll test/cleanup this more & move to the wiki; but I hope this helps
even in this quick-braindump form :-)

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.