All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nico Williams <nico@cryptonector.com>
To: Philip Oakley <philipoakley@iee.org>
Cc: Sergei Organov <osv@javad.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	"Besen, David" <david.besen@hp.com>,
	git discussion list <git@vger.kernel.org>
Subject: Re: Amending merge commits?
Date: Tue, 29 Jul 2014 15:19:14 -0500	[thread overview]
Message-ID: <CAK3OfOgZt55+tKv5455Jk-F=buULtftmCasbxHYcxGzppbWcfg@mail.gmail.com> (raw)
In-Reply-To: <DFE66A48CBC646E795B3B4A0903AB19E@PhilipOakley>

On Tue, Jul 29, 2014 at 2:29 PM, Philip Oakley <philipoakley@iee.org> wrote:
> From: "Nico Williams" <nico@cryptonector.com>
>> Local merge commits mean that you either didn't rebase to keep all
>> your local commits on top of the upstream, or that you have multiple
>> upstreams (the example exception I gave).
>>
>> Conversely, if you always rebase your local commits on top of the
>> upstream then you won't have merge commits to worry about.
>>
> Whilst it may not be "the Git Way", I'd expect that in many less well
> informed companies, the need to keep merge commits fom other lines of
> development would be quite a common (political ) technique where some
> preparatory branch needs to be merged in before one's feature can be
> completed (similar to all those cases on the list when folk say 'builds on
> top of xy's commit deadbeaf)

The way we did this at Sun, first with Teamware, then later with
Mercurial, was as follows:

 - "projects" kept their own clone repos of the upstream
 - engineers working on a project cloned the project repo ("project gate")
 - engineers pushed/pulled to/from the project gate
 - each project gate had a gatekeeper whose job it was to periodically
rebase onto the latest upstream
 - then engineers would rebase onto the new project gate

No "merge turds" (Sun speak) were ever allowed in any upstream,
whether a project gate or the ultimate upstream.  All commits had to
be organized according to specific rules, and squashed.  These rules
applied at the project gate and in the upstream.

 - when the project was ready for integration the gatekeeper would
rebase and squash as necessary, then push to the upstream

(I'm eliding some details.  In particular when an intermediate
upstream rebased the previous head was left available as a "snapshot"
to make the equivalent of git rebase --onto possible.)

The upshot was: all local commits were always on top of whatever the
next upstream in the chain was.  Always.  No merge commits ever.

That workflow works just fine with git.  It worked really well at Sun
(with thousands of engineers working on Solaris alone).  And it should
work well for anyone who doesn't have two or more forked upstreams to
follow.

Nico
--

  reply	other threads:[~2014-07-29 20:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 21:47 Amending merge commits? Nico Williams
2014-07-29  9:58 ` Sergei Organov
2014-07-29 15:44   ` Nico Williams
2014-07-29 19:29     ` Philip Oakley
2014-07-29 20:19       ` Nico Williams [this message]
2014-07-29 21:38         ` Philip Oakley
2014-07-29 22:07           ` Nico Williams
2014-07-30  8:42     ` Sergei Organov
2014-07-30 17:43       ` Nico Williams
2014-07-30 18:28         ` Sergei Organov
  -- strict thread matches above, loose matches on Subject: below --
2014-07-25 22:03 Besen, David
2014-07-25 22:11 ` David Besen
2014-07-25 22:19 ` Jonathan Nieder
2014-07-25 22:23   ` Besen, David
2014-07-25 22:31     ` Jonathan Nieder
2014-07-28 19:37       ` Sergei Organov
2014-07-28 20:00         ` Jonathan Nieder
2014-07-28 20:53           ` Sergei Organov

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='CAK3OfOgZt55+tKv5455Jk-F=buULtftmCasbxHYcxGzppbWcfg@mail.gmail.com' \
    --to=nico@cryptonector.com \
    --cc=david.besen@hp.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=osv@javad.com \
    --cc=philipoakley@iee.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.