From: Johannes Sixt <j6t@kdbg.org>
To: Henning Moll <newsScott@gmx.de>, git@vger.kernel.org
Subject: Re: squash commits deep down in history
Date: Thu, 23 Oct 2014 22:08:22 +0200 [thread overview]
Message-ID: <54496036.8080109@kdbg.org> (raw)
In-Reply-To: <trinity-6a57d894-cc4f-4213-9c51-5c73de2501d0-1414067657189@3capp-gmx-bs48>
Am 23.10.2014 um 14:34 schrieb Henning Moll:
> i need to squash several commits into a single one in a automated
> way. I know that there is interactive rebase, which can also be
> automated using GIT_SEQUENCE_EDITOR. Unfortunately my history is very
> large and i need to squash deep down in the history several times. So
> using interactive rebase seems not to be the right tool.
>
> I wonder if i can solve this task using filter-branch? I have a file
> that list the SHA1s for each squash operation per line. All SHA1s of
> a line are in chronological order (youngest to oldest), or in other
> words: the first SHA1 is the child of the second, and so on.
Use git-replace do construct a squashed commit that replaces the last
child in each run such that its parent points to the parent of the first
in the run. Then use a git-filterbranch without filters to burn the
parenthood into the history.
-- Hannes
next prev parent reply other threads:[~2014-10-23 20:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 12:34 squash commits deep down in history Henning Moll
2014-10-23 20:08 ` Johannes Sixt [this message]
2014-10-23 22:20 ` Henning Moll
2014-10-24 11:43 ` Jakub Narębski
2014-11-04 17:25 ` Phil Hord
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=54496036.8080109@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=newsScott@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.