Now, I'm very aware of the possibility that I'm just doing this totally wrong, so let me describe my problem.
I have a feature branch of a very active master branch. The project is extremely large. I've changed ~30 files in my branch, and it's not done yet, so I need to make sure I keep up with master. So, I do:
git merge --no-commit -s recursive -X theirs upstream/master
I get a giant mess. The files I didn't touch are often merged in really stupid ways, and the files I did touch are of course merged badly. The ones I did touch I understand that I have to fix myself.
I've tried other arguments to git merge as well, but it's not doing what I want.
How can I merge the master into my branch, and somehow say that it should just overwrite everything but the stuff I have touched?
Right now, the process I have to follow is this:
So, what am I doing wrong here?
Perform the following steps:
git merge master
Conflicts will appear.
For files changed by you:
git checkout --ours file_name_modified_by_you
For files not modified by you:
git checkout --theirs file_name_not_modified_by_you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.