Q:

How to restore my added but not committed files that was modified by git

I did a stupid thing; I did 'git fetch' on local repository that was not committed. So my files now overwritten by it. How I can restore my plight that was before this stupid mistake?

things that I've done:

Modify some file on web-github-commit this (because I'm stupid)
git add .
git commit -m 
git push origin branchA -> that was rejected because of the commit I've done from website
git reset --hard HEAD^ (because I'm really stupid)
git push origin branchA -> rejected because remote contains the work that I do not have locally (same reason as 4)
git fetch -> counting objects 5
git reset --hard HEAD^ (this is the point when I was starting to think that I'm doing shit)
git reset 'HEAD@{1}' -> my files modified (I'm sorry initially I was thinking that git fetch botched my life)

A:

Just performing a git fetch doesn't touch the working tree. (git pull would try, because that does a fetch followed by a merge, but that's a different matter.)
It looks like you have committed the changes though - but then confused yourself afterwards (which can be easy to do with git, certainly...)
Fortunately, git reflog is your friend: it will show you everything you've done, including the commit hashes along the way. Run it and find the commit you want to get back to, then use git reset --hard <commit> to get back there. You can then merge the fetched changes, or rebase, or whatever it is you want to do.

