In git, how to remove file deletions and renames, starting from a certain commit in a branch, while maintaining the history of changes for each file (both deleted and renamed)?
My use case is that I took a branch and started from there a new branch where I removed some files and renamed some others. I then modified the remaining (and often renamed) files (and also added some files). Now I want to revert back to the original names and recover the deleted files (that still exist at the common base), while keeping the history of everything. My final goal is to be able to merge back in the original branch (so without the renames and file deletions that I introduced).
Can this be done? I am wondering how easy this is, especially since the renamed files were modified (so naively removing the renames would sever the history link between the original files and the modifications, which I instead want to keep)…
PS: The changes since the branch diverged are extensive (at least on the "cleaned" branch).