After some playing with remotes I ended up with all my commits being doubled. E.g. instead of
C3107
..
C3
C2
C1
I got
C3107
C3107
..
C3
C3
C2
C2
C1
C1
where doubled commits has same names but different hashes. The problem is I noticed it too late and not I added a good bunch of commits on top of it.
Is there a way to remove duplicate commits and not not loose ones I added over?
P.S.: If it will help I have a copy of a repository before my experiments with remotes.
Thanks a lot in advance.
UPDATE As many of you asked here is how ended up like this: I have a repo R1 then I created another one R2. At my local copy which was up to date with R1 I changed origins to R2 and tried to push but some large files were rejected by github. So I did git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename'
which made git think repositories are different. Then I pushed all to R2 made some commits and decided to switch back to R1 changed origin again and pushed. Then I added some more commits to R1.