I originally made an attempt to remove a local commit by typing git checkout #######
<---- being the first 7 digits of the commit
From there it put me in some Detached Head state of some sort where it would say Detached Head and the commit ########. I didn't realize this so I kept commiting locally as normal. When I went to go push it to github using 'git push origin master
' it said everything was already up to date.
I without realize it switched back to master by typing in git checkout -
and now I'm back in my master branch with those previous commits not showing up in git log
that I did before I switched back to my master. Now that code won't appear on my GitHub even if I try making new edits/commits to my GitHub, so it's out of sync so-to-speak. How do I get those commits back and sync my Github properly?