Login
You're viewing the chinwag.org public feed.
  • Jul 23, 2025, 6:38 AM

    Assuming I do not care about commit IDs (I want to rewrite history after all) is there a #git tool out there, that would let me do a `git rebase` but squish/bucket things by date?

    Example:
    - Anything older than a year, squash by month
    - Anything older than a month squash by week

    I am using git to watch changes to some files, but at some point, I do not care so much about detailed older history, only detailed recent history.

    #lazyweb

    💬 1🔄 0⭐ 0

Replies

  • Jul 23, 2025, 9:40 AM

    Experimenting some more, I *might* be able to programmatically do an "interactive rebase" by carefully crafting the `.git/rebase-merge` directory 🤔

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Jul 24, 2025, 2:45 PM

    @kfdm @carlton haha, so git-rewrite-digest? You can probably yoink some of my code and make it work for that, at least the commit tree gathering and then the rebasing - hilariously, the easiest way to hook into the rebase process is to set EDITOR to a script that outputs the wanted actions (so squash in your case, reword/amend in mine), and then run through the interactive rebase step by step. We made this world...

    💬 0🔄 0⭐ 0