Bug Bounties

Can I force a "no-changes rebase" without a rerere history DB?

<sub>(a variation on on @j6t 's suggestion:)</sub> You can use the commit editing feature of [`git-filter-repo`][1]. This tool is generally interesting for applying callback-based or analysis-based transformations on git repositories, but the specific capability you would likely use is the ability to run a given Python script on each commit: ``` $ cd /path/to/repository $ git-filter-repo --commit-callback 'SCRIPT BODY HERE' ``` Now, when the script is run, an object named `commit` will be defined. This object has, among others, the fields `commit.original_id` holding the hash, and `commit.message` holding the commit message. Thus your script might be something like: ``` 'if (commit.hash.startswith(b"0xdeadbeaf")): commit.message.replace(b"Hello world", b"Goodbye world") ' ``` You can also look at [a few more examples][2] of git-filter-repo scripts. Caveat: Haven't tried this myself yet. [1]: https://github.com/newren/git-filter-repo [2]: https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES