Re: collapsing commits with rebase
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 8, 2009, 00:45 UTC
- Message-ID
- <alpine.DEB.1.00.0901080144270.30769@pacific.mpi-cbg.de>
- In-Reply-To
- <93c3eada0901071608r190a723bma502b68c4ab81a08@mail.gmail.com>
Hi,
On Thu, 8 Jan 2009, Geoff Russell wrote:
Show 9 quoted lines
> 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 ;-)
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
Hth, Dscho