Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid merge conflicts from pull? [duplicate]

Tags:

git

I keep the repositories of several open source projects locally for reference. I update them infrequently and the result is that I end up with merge conflicts. When it comes to the Linux kernel this can be hundreds of files.

How can I tell git to pull from upstream and accept all changes blindly?

like image 639
ruipacheco Avatar asked Aug 11 '16 17:08

ruipacheco


People also ask

Why am I getting so many merge conflicts?

Often, merge conflicts happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file. You must resolve all merge conflicts before you can merge a pull request on GitHub.


1 Answers

git pull --strategy theirs should have you covered :)

like image 183
BlueSpaceCanary Avatar answered Nov 15 '22 16:11

BlueSpaceCanary