I wanted to go to a previous version, then I did
git checkout 577ba726a9e21a62d33f2f1837ccb0a47ee434b4
git commit -m "revert"
Then I realise that it does not work as what I expected: the code in the github webpage is not what was in 577ba726a9e21a62d33f2f1837ccb0a47ee434b4
. So I manually modified the whole code as what was in 577ba726a9e21a62d33f2f1837ccb0a47ee434b4
. Then I did
git add .
git commit -m "m"
git push -u origin master
git pull origin master
But it gives me
HEAD detached from 577ba72
nothing to commit, working tree clean
Branch master set up to track remote branch master from origin.
Everything up-to-date
From https://github.com/chengtie/funfun
* branch master -> FETCH_HEAD
Already up-to-date.
And the code in my local disk is NOT the code in the github page.
How could I align these two places? I am totally lost...