From: Jacob Helwig <jacob.helwig@gmail.com>
To: Bill Lear <rael@zopyra.com>
Cc: Howard Miller <howard@e-learndesign.co.uk>, git@vger.kernel.org
Subject: Re: Any way to "flatten" a series of changes in git
Date: Thu, 22 Oct 2009 13:51:01 -0700 [thread overview]
Message-ID: <8c9a060910221351w12e6c610kb842263e1c02ea63@mail.gmail.com> (raw)
In-Reply-To: <19168.50232.47935.864407@lisa.zopyra.com>
On Thu, Oct 22, 2009 at 13:44, Bill Lear <rael@zopyra.com> wrote:
> On Thursday, October 22, 2009 at 15:30:53 (-0500) Bill Lear writes:
>>On Thursday, October 22, 2009 at 21:03:44 (+0100) Howard Miller writes:
>>>Hello,
>>>
>>>I have a branch with a whole series of commits. I want to export this
>>>work to be customer (to their svn repo if that has any bearing on it).
>>>All the stuff in the history is irrelevant to my customer ("committing
>>>now, going to bed" etc.) so I'd like to create a new branch that only
>>>has one commit.. the end point with a new message. Is this possible?
>>
>>git rebase is your friend.
>
> Someone correct me if I'm wrong.
>
> % git branch
> * master
> % git checkout -b my_work_branch
> % [work work work, commit, commit, commit]
> % git rebase -i master
>
Alternatively, you could use git merge --squash
git checkout master
git merge --squash topic
See git-merge(1) for details.
rebase --interactive it excellent for cleaning up history, especially
if you want to end up with more than one commit at the end. merge
--squash is usually sufficient if all you need is one commit at the
end.
next prev parent reply other threads:[~2009-10-22 20:51 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 [this message]
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
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=8c9a060910221351w12e6c610kb842263e1c02ea63@mail.gmail.com \
--to=jacob.helwig@gmail.com \
--cc=git@vger.kernel.org \
--cc=howard@e-learndesign.co.uk \
--cc=rael@zopyra.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).