From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Howard Miller <howard@e-learndesign.co.uk>,
Jakub Narebski <jnareb@gmail.com>,
git@vger.kernel.org
Subject: Re: Any way to "flatten" a series of changes in git
Date: Thu, 22 Oct 2009 23:16:24 -0700 [thread overview]
Message-ID: <7v4opqeitj.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4AE143BC.7040507@viscovery.net> (Johannes Sixt's message of "Fri\, 23 Oct 2009 07\:48\:44 +0200")
Johannes Sixt <j.sixt@viscovery.net> writes:
> The easiest way (IMHO) to achieve this is certainly:
>
> # start a new branch at the tip of the series
> $ git checkout -b all-in-one the-series
>
> # squash 17 commits
> $ git reset --soft HEAD~17
> $ git commit
>
> Now you have a new branch 'all-in-one' that has the same contents as the
> original series 'the-series', but with only one commit:
>
> $ git diff the-series..all-in-one # must show no differences
I think --squash "*merge*" is conceptually simpler to explain *and*
has an added advantage that it helps preparing the consolidated log
message.
# start from the last customer dump
$ git checkout -b customer-update last-release
# give the customer the greatness in the series, content-wise
$ git merge --squash the-series
$ git commit
This will start the "customer-update" branch starting from the
last dump you gave to the customer, merge in the changes made
in the series without history, and when you make a commit, you
will have access to all the individual log messages in the
series to look at as reference, so that you can cut and paste
from them to summarized message instead of typing everything anew.
prev parent reply other threads:[~2009-10-23 6:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 20:03 Any way to "flatten" a series of changes in git Howard Miller
2009-10-22 20:30 ` Bill Lear
2009-10-22 20:44 ` Bill Lear
2009-10-22 20:51 ` Jacob Helwig
2009-10-22 20:58 ` Howard Miller
2009-10-26 13:42 ` Daniele Segato
2009-10-22 20:59 ` Jakub Narebski
2009-10-22 21:11 ` Howard Miller
2009-10-22 21:24 ` Howard Miller
2009-10-22 21:57 ` Jakub Narebski
2009-10-23 5:36 ` Howard Miller
2009-10-23 5:40 ` Howard Miller
2009-10-23 5:48 ` Johannes Sixt
2009-10-23 6:16 ` Junio C Hamano [this message]
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=7v4opqeitj.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=howard@e-learndesign.co.uk \
--cc=j.sixt@viscovery.net \
--cc=jnareb@gmail.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).