I messed up badly my code and I want to revert it to the last commit.
I'm doing git status
and I see that I changed a lot of files. I don't want to see them at all. So I did git log
and found out the hash of last commit.
I used this hash in command: git fetch origin this_hash
and got the message:
Mig-macbook-air:ios M$ git fetch origin this_hash
From https://github.com/linkto/myrepo
* branch this_hash -> FETCH_HEAD
but then when I do git status
I still see broken files, also I see them in my IDE. I want to completely get rid of those changes, how can I do it?
I didn't do push on the last commit; I just created a branch and did a commit.