Answers for "having a pull overwrite local changes"

66

how to pull and overwrite local changes git

git fetch --all
git reset --hard origin/master
Posted by: Guest on February-29-2020
0

How do I force "git pull" to overwrite local files?

The only thing that worked for me was:

git reset --hard HEAD~5
This will take you back five commits and then with

git pull
I found that by looking up how to undo a Git merge.
Posted by: Guest on March-15-2022

Code answers related to "having a pull overwrite local changes"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language