git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* squash commits deep down in history
@ 2014-10-23 12:34 Henning Moll
  2014-10-23 20:08 ` Johannes Sixt
  2014-11-04 17:25 ` Phil Hord
  0 siblings, 2 replies; 5+ messages in thread
From: Henning Moll @ 2014-10-23 12:34 UTC (permalink / raw)
  To: git

Hi,

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.

| ab4423e 3432343 3234252
| 2324342 5232343
| ...

Lets say there are N lines in that file. Each line means: squash all SHA1s of this line into the first (or last) SHA1 of this line.
Performing this task with rebase would require N rewritings of the history. So e.g. HEAD (but many others too) would be rewritten N times even if it is not directly part of a line. My thinking is, that a filter-branch can do this in a single rewrite and therefore would be much more performant.

How can i solve this? Any ideas?

Best regards
Henning

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-04 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 12:34 squash commits deep down in history Henning Moll
2014-10-23 20:08 ` Johannes Sixt
2014-10-23 22:20   ` Henning Moll
2014-10-24 11:43   ` Jakub Narębski
2014-11-04 17:25 ` Phil Hord

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).