Answers for "git local hard reset"

5

reset branch on local git

git fetch origin
git reset --hard origin/master
Posted by: Guest on April-14-2020
2

git reset hard for remote

git reset --hard <commit-hash>
 git push -f origin master # only works for unprotected branches that allow force push
Posted by: Guest on September-21-2020
1

git checkout reset hard

git checkout reset HEAD~1
Posted by: Guest on May-11-2020

Browse Popular Code Answers by Language