I saw that the command
git reset --hard origin/master
git reset --hard origin/master wouldn't have an effect on a remote branch if it were applicable; effectively, what you're telling your local branch to do is to move HEAD to the same commit as reflected in
origin/master as your repository knows it. This will not touch your remote branch.
git fetch wasn't run prior, you do run the risk of overwriting your local repository with an older variant of your remote repository, which is entirely fixable with
git fetch && git reset --hard origin/master.
If you wanted to reset commits against your remote repository, you would have to first apply them to your local repository, then force-push them via
git push -f.
Note that these kinds of changes that you do with respect to Git are done to your local repository first; if you want to publish them to your remote repository, you have to invoke different commands.