+6 votes
1 view
in Devops and Agile by (20k points)
edited by

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.

1 Answer

+7 votes
by (28.4k points)
edited by

Here are two solutions: 

$ git checkout HEAD^ file/to/overwrite

$ git pull

For more commands like this please go through the following tutorial that will help you understand the git
 

 
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...