Answers for "git Reset hard origin"

6

git reset origin

git fetch origin
git reset --hard origin/master
Remember this forever
Posted by: Guest on May-28-2020
0

git reset branch

git fetch origin
git reset --hard origin/branch_name
Posted by: Guest on November-05-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 reset hard to remote

git reset --hard origin/master; git commit -m 'reset to remote';git push --force local dev
Posted by: Guest on August-12-2020
0

how to reset local master to origin master

git checkout -B master origin/master

//for branch
git checkout -B <branch> origin/<branch>
Posted by: Guest on November-09-2020
5

git reset hard

git reset --hard f414f31
git reset --soft HEAD@{1}
git commit -m "Reverting to the state of the project at f414f31"
Posted by: Guest on April-28-2020

Browse Popular Code Answers by Language