git reset local repository code example
Example 1: git reset from repository
git fetch --all
git reset --hard origin/master
Example 2: git reset hard for remote
git reset --hard
git push -f origin master # only works for unprotected branches that allow force push
Example 3: git reset remote origin
$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git