Let's say I have a project with so many commits that manually rebasing from the beggining is impossible. Let's also say that there are no branches or tags, only master. Let's also say that there are some merge commits, but probably too many to manually merge them or even track them.
My question is: How can I squash all commits from the very first commit up to commit XYZ into a single commit?
Graphical representation of what I want to convert:
/--R--T--Y---\
A--B--C--D--/--G--H--J--K--\---Q--X--Z---....
should look like:
--<I don't care how you will do it git, just put everything from everywhere in a single commit here>----Q---X---Z.....
Is that possible?