How do I force “git pull” to overwrite local files?
How do I force an overwrite of local files on a git pull ? The scenario is following: This is the error I'm getting: How do I force Git to overwrite them? The person is a designer - usually I resolve all the conflicts by hand, so the server has the most recent version that they just needs to update on their computer. 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: Then, you have two options: OR If you are on some other branch: git fetch downloads the latest from remote without trying to merge or rebase anything. Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master [*] : It's worth noting that it is possible to maintain current local commits by creating a branch from master before resetting: After this, all of the old commits will be kept in new-branch-to-save-curren...