I had a repository with this history:
A---B---C---D
Then, this repository was "split" (basically, another repository was created with it's history beginning at 'D' with the use of git-subtrees).
Now, I have this other repo with this history:
# The same D as the other
D---E---F---G
How can I join these two "parts" of the same project storyline into one repository?
The final result must be:
A---B---C---D---E---F---G
I've already tried a number of things but all of them includes merging, and that's not what I intend, because merging doesn't preserve some changes like deleted files.
Also, I tried to generate patches for all changes of this last version of the repository and apply them in the old one, but got lots of error: <file> already exists in index errors.
Update
I found this other question about re-parenting a commit and that was exactly what solved my problem, a combination of both git replace --graft and git filter-branch.
Update 2
Now my task is complete and I posted the complete, correct answer to the problem below.