Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TUYFZ-0003Hp-Qz for pgsql-jdbc@postgresql.org; Sat, 03 Nov 2012 07:34:37 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TUYFY-0003Td-BY for pgsql-jdbc@postgresql.org; Sat, 03 Nov 2012 07:34:37 +0000 Received: by mail-pa0-f46.google.com with SMTP id hz1so2910539pad.19 for ; Sat, 03 Nov 2012 00:34:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=7i9RrSqdGSI62wdaMwSPQKfTMd25XJCQv2Au26A3yQg=; b=kTk9QBTbDYRU4Kh0rv+EPJSsQjXYAXxBogu642w76kgf3qLCB5XMYHzqZOsARpXK8h HNcRD7UeJ4VEUymH+FetssJ1Qbx8nN1kQYyMsOth4RSTa8e3xIo/crqkG7Q7F6xrdA1Y wXh+gxmIFCfk4A8U4YRg5BWC4wMN3TITltX+FEjkhbRX7WoylQ0W0a1x0WiGseGHsaoA j8AfnbQUG4Z4TtZZMF2Q+xrGHt5uA3uvVfHIL4HDAB4RxxOJFTsb1T4ewAWs9s0zCgPx jCmcG5g5kZFv9A7Wzh1zGGPq9E/jzxGHkbBSKd5jt/VnM64uznrY6a/qbQ8DxYN3uGmA dB8w== Received: by 10.66.78.104 with SMTP id a8mr12010764pax.38.1351928075318; Sat, 03 Nov 2012 00:34:35 -0700 (PDT) Received: from ayaki.localdomain (124-148-90-153.dyn.iinet.net.au. [124.148.90.153]) by mx.google.com with ESMTPS id n7sm7004534pav.26.2012.11.03.00.34.32 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2012 00:34:34 -0700 (PDT) Message-ID: <5094C905.5060505@ringerc.id.au> Date: Sat, 03 Nov 2012 15:34:29 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Maciek Sakrejda CC: Dave Cramer , List Subject: Re: git gururs References: In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnmlqkxtFrhxuG8b54Qufj9vnmNrXtBI0Nbi5aUrjOBWK/J37M8R00GEmMCZH6wSkYW6iIi X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/15 X-Sequence-Number: 23482 On 11/02/2012 03:13 AM, Maciek Sakrejda wrote: > Git cherry-pick is probably the right tool for this. Commit on master, > and cherry-pick that commit from all branches you want to back-patch > to (note that due to the way git names commits, you can just say "git > cherry-pick master" to grab the latest commit from master). If the > most recent release branch has not diverged from master (that is, all > commits on master are also on this branch), you can just merge master > into the branch (a fast-forward merge) to make it current. It will do > the same thing as a cherry-pick, but more simply. > > This is fairly simple, but just as importantly, it keeps the semantics > you want: you are making changes to master (trunk), but back-porting > them to select branches. It also keeps the commit history fairly > clean. I'd second that. git cherry-pick is very useful. The other tool I use a fair bit is `git merge --squash` when I want to compact the contents of a messy working branch down to a single commit. I usually prefer to `git rebase --interactive` the working branch to clean it up then `git merge` it into the target branch, but that isn't always practical. The main thing I find to be important is to maintain clear, discrete units of work, not change sets that fix X and Y and add Z. That way you can easily keep track of the fact that change is in branches A, B and C. -- Craig Ringer