Someone else already named some tools, so I won’t repeat. But the reason this works is that even once you clear out those trash files, the OS usually only removes the pointer to where the data lives on the disk, and the disk space itself isn’t overwritten until it’s needed to save another file. This is why these tools have a much higher chance of success sooner after file deletion.
Do you not use a fork as your origin, separate from the production upstream repo? I’ll push to my fork’s main branch for small or urgent changes that will definitely be merged before anything else I’m working on.