Shell/Bash: git reset from repository Example


Shell/Bash Example: This is the "git reset from repository" Example. compiled from many sources on the internet by

git reset from repository

git fetch --all
git reset --hard origin/master

git reset origin

git fetch origin
git reset --hard origin/master
Remember this forever

git reset branch

git fetch origin
git reset --hard origin/branch_name

git reset hard for remote

 git reset --hard 
 git push -f origin master # only works for unprotected branches that allow force push

* Summary: This "git reset from repository" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!