Upon coding, I realized I had made a mistake. I used
git checkout 7e57dbf5a7245...
to revert to an older commit. Now when I commit using
git commit -a
it says I am committing to a [detached HEAD f69ae14]. When I use
git push origin master
it says Everything’s up to date… What do I type to push this [detached head] commit back to the master?
You current log must be something like this
Now you should reset
masterto currentHEADposition, makemastercurrent branch and push it toorigin:Note that you will lose all commits between
7e57dband currentmaster.