After some playing with remotes I ended up with all my commits being doubled. E.g. instead of
C3107
..
C3
C2
C1
I got
C31
With a bit of shell magic, grepping and a lot of confidence, then the answer is probably "yes". But I'd be too leery of completely messing things up to squash over 3000 commits with a single command!
However, you can do it (moderately) interactively by using interactive rebasing. It's a bit laborious, but you have good control over what's happening and you get good feedback from git.