What I want to do:
- Pull from my remote repository on github.
- Preserve all the files in my local repository and discard the ones from github.
- Push my “up to date” local repository into github.
So imagine you’ve made a lot of changes in your local repository and is now very different from your github repository.
I could do:
- git pull origin master: to get the remote repository
- git mergetool: to resolve all the conflicts one by one.
But is there any way to resolve all the conflicts automatically?
That is, tell git that you simply want to preserve the files version from your local repository and discard the ones from the remote repository.
You could pull with the ours merge strategy
From kernel.org