git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: George Spelvin <linux@horizon.com>
Cc: git@vger.kernel.org
Subject: Re: Git workflow: how to achieve?
Date: Fri, 24 Apr 2009 09:31:22 +0200	[thread overview]
Message-ID: <20090424073122.GA9603@pengutronix.de> (raw)
In-Reply-To: <20090424045843.7674.qmail@science.horizon.com>

On Fri, Apr 24, 2009 at 12:58:43AM -0400, George Spelvin wrote:
> Here's something I and my co-workers would like to achieve, but are not
> too sure how to arrange.
> 
> I want to be committing to a feature branch, but always be compiling
> and testing a merge of that branch and several others.  (Kind of like
> linux-next.)  I want to be able to switch feature branches easily.
> 
> For example, I may have a background project that I'm working on slowly in
> between short-term fixes.  Or I want to be running the latest kernel.org
> kernel while my patches await approval.
> 
> If it's just my own projects, I can just commit in random order and
> straighten things out later.  Although even that is problematic,
> as I may not remember what line of development a cleanup patch is a
> prerequisite for.  (This is something that darcs is apparently good at.)
> 
> But when I want to be testing something highly volatile like linux-next,
> and ensuring that my work continues to merge with it cleanly, as well
> as helping others with their branches, it becomes a daily pain.
> 
> The best attempt I have so far is to rebase a lot.  But that means that
> I can't do any merging in my development branch lest the rebasing turn
> into a mess.  And forcing everything to be linear makes changing branches
> a pain.  And I can't share half-finished versions with co-workers.
If you develop a topic, say gs/fix_bug_12345, optimally you should base
it on the commit introducing the bug.  Then you can have several
integrating branches, say

	next/gs/fix_bug_12345
	linus/gs/fix_bug_12345
	$company_stable/gs/fix_bug_12345

and in these branches you can regularly merge in the current state of
your gs/fix_bug_12345 branch.  You might want to take a look on topgit,
which can automate the propagation for you.

And/or you might want to look into the linux-tip scripts by Ingo
Molnar[1].
 
> ((Another really simple feature I keep wanting is "git commit -b
> <newbranch>".  I should probably try to write a patch...))
Well currently this can be done in two commands:

	git checkout -b <newbranch>; git commit

AFAIK it even works if you already modified the index.

Best regards
Uwe

[1] git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git tip:.tip

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

  reply	other threads:[~2009-04-24  7:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24  4:58 Git workflow: how to achieve? George Spelvin
2009-04-24  7:31 ` Uwe Kleine-König [this message]
2009-04-24  7:35 ` Andreas Ericsson
2009-04-27 22:59   ` George Spelvin
2009-04-28  7:24     ` Andreas Ericsson
2009-04-28 14:02       ` George Spelvin
2009-04-28 15:00         ` Andreas Ericsson
2009-04-28 15:59         ` Sitaram Chamarty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090424073122.GA9603@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=git@vger.kernel.org \
    --cc=linux@horizon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).