You've ended up creating commits based on
patterns_new when you did not have the branch checked out.
Which is fine, the commits are still there OK, but they're not on that branch. Your commit B,
303e50d, is the last commit on that unnamed branch and is the last one that has your change.
Your commit C,
4835b67, has the original
dbf4c2863, as its parent.
Name a new branch on
303e50d and merge it with wherever your latest changes are and everything will be OK.
Also, note that commits are never "overwritten" or changed in any way: they can't be - the hash wouldn't match! You can only ever add new commits or have commits without branches or tags garbage collected after a few weeks.