gitgit-pullgit-stash

How do I ignore an error on 'git pull' about my local changes would be overwritten by merge?


How do I ignore the following error message on Git pull?

Your local changes to the following files would be overwritten by merge

What if I want to overwrite them?

I've tried things like git pull -f, but nothing works.

To be clear, I only want to overwrite specific changes, not everything.


Solution

  • Alright with the help of the other two answers I've come up with a direct solution:

    git checkout HEAD^ file/to/overwrite
    git pull