How do I force “git pull” to overwrite local files?

August 22, 2020 0 Comments

If you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected.

I think this is the right way:

git fetch --all

Then, you have two options:

git reset --hard origin/master

OR If you are on some other branch:

git reset --hard origin/<branch_name>

[smbtoolbar]

 

To Top