so today i was messing around with my project and i was being funny buy seeing how much project has changed so i thought i go back all the way to the first commit so did the git log command, and got the commit id, then i sent my command:

git checkout 4hf5h4

i was able to see the oldest version of my website.

now that i was happy, i wanted to go back to the latest commit, so the obvious command was

git checkout master

BANG!!!! thats when i got this error message: error: pathspec 'master' did not match any file(s) known to git.

i panic, i didnt know what to do, i searched online and all i found was this command on stackoverflow:

git checkout master

git reset --hard

it didnt work, i thought i has lost all my work. i was so disapointed, but i didnt give up. i kept searching. until finally i found the correct command:

git branch

* new_branch_name

when i sent git branch, it displayed all my branches, and while there was a master branch, that was not my project, my project was gh-pages so finally i sent the command:

git checkout gh-pages

it worked!!!