I pushed some changes to our central git repository, and then immediately realized that I had an old, now obsolete change lying around, and that I had introduced a merge with it:

I then used git rebase to get rid of this spurious parent:

Then I pushed this with git push -f to origin. It answers with “everything up-to-date”.
Now I would expect the central repository to match what I have locally. However, when I clone the project anew, I still have the spurious parent inside. What’s worse is that git wants to merge, and if I let it do that, I get my latest commit twice (once with the old hash, and once with the new one after rebasing).
How do I get git to push what I have without merging, and just take my repository state as the new state (so basically, to reject all remote differences)?
or am I doing this wrong? I want to get rid of the “When reading a property…” commit, and the whole red line in the upper image.
You can solve this in various ways. One way is to reconstruct the history locally by using reset, stash and commit. The following will undo your last commit (Initial import of the…) and stash away those changes.
Now you can reset your master to the commit you had before you did the merge, assuming abcd1234 is the hash of the “Testing git.” commit:
Now bring back the stash and commit it again:
Now finally push up your rewritten master: