Re: collapsing commits with rebase
- From
Geoff Russell <geoffrey.russell@gmail.com>
- Date
- Jan 8, 2009, 01:59 UTC
- Message-ID
- <93c3eada0901071759u2496835dy134d92613bf4244b@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.1.00.0901080144270.30769@pacific.mpi-cbg.de>
On Thu, Jan 8, 2009 at 11:15 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
> Hi, > > On Thu, 8 Jan 2009, Geoff Russell wrote: > >> Dear gits, >> >> I have a series of commits: >> >> A---B---C---D---E---F >> >> I want to collapse B---C---D into one single commit. git rebase -i B >> will allow me to do this, but I'm looking for a non-interactive >> incantation. > > You set GIT_EDITOR to a script ;-)
This is plan B.
Show 8 quoted lines
> > Alternatively, something like this should work for you: > > $ git checkout A > $ git read-tree -u -m D > $ git commit -m "My message" > $ git cherry-pick E > $ git cherry-pick F
Plan B is looking good, because I'd generally like the commit message to be the concatenation of the messages for B,C and D.
Many thanks.
Geoff.