[Twisted-Python] github, again

Jonathan Ballet jon at multani.info
Wed Jun 5 01:56:09 MDT 2013

Hi, just shiming in,

On Tue, Jun 04, 2013 at 09:55:19PM +0100, Terry Jones wrote:
> > So when the code is ready, the feature branch including any accumulated
> commits (history) will
> > get merged - and not a clean diff against the main repo?
> I'm very far from being a git expert. In fact, I'm kind of the opposite -
> git and I have a stormy relationship and everyone has to tell me what to do.
> But, I believe this is what git rebase is mainly used for. You can rebase
> your branch against an updated master and (I'm guessing) make your changes
> look like a single diff. Some people don't like that as it changes history,
> others do like it and say yes, that's the point - clean up the history so
> the commit log isn't full of tiny changes that were all made in order to
> effect some change (i.e., address a given ticket/issue).

This is actually called a "squash" in Git terminology - Git has an
option called "--squash" for the "merge" command which precisely do
that. This is, FYI, part of the merge policy used by projects like
PostgreSQL for example [1]

I'm not sure we can exactly say it changes the history: a brand new
commit is actually created, which is the sum of all the commits from the
branch which is merged, but as I see it, it's as if someone else
commited this new feature, and branches become completely throwable in
the end.

I let the Git manual explain the squash feature (extract from "git help
merge"; the second sentence is probably the most useful):

    --squash, --no-squash
        Produce the working tree and index state as if a real merge
        happened (except for the merge information), but do not actually
        make a commit or move the HEAD, nor record $GIT_DIR/MERGE_HEAD
        to cause the next git commit command to create a merge commit.
        This allows you to create a single commit on top of the current
        branch whose effect is the same as merging another branch (or
        more in case of an octopus).

        With --no-squash perform the merge and commit the result.  This
        option can be used to override --squash.


[1]: http://wiki.postgresql.org/wiki/Committing_with_Git

> I'm REALLY far from being a git pro, so someone else should confirm/correct
> this.
> Terry

More information about the Twisted-Python mailing list