Push origin master does not see last commit on local repo

I have a local repo that was in sync with my github remote repo.
I was testing revert.
I made a new commit
then checked out the previous commit
then reverted to the previous commit
git log looked good.
Then I made a new commit again and attempted “git push origin master”
I got the following=>Everything up-to-date
So I ran “git log” again and it shows the new commit at the top (HEAD)
The push does not see the latest commit. Why? and how to fix?

This can be closed. I think the reason is that the head was detached. Once I checkout out the master it pushed properly.

1 Like