user1132363 user1132363 - 1 year ago 177
Git Question

How to ignore 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.

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download