You want to use our strategy (and not a strategy variant, as indicated in the previous version of this answer); while on upgrade , use git merge -s ours master . According to more details in the git man merge page , this will not attempt to perform the actual merge at all, but just use the tree from the ours side for the result and discard each other side in the merge.
Using a merge with this will contain the whole story, create a merge commit (showing the convergence of the two branches in the story), but use all the files on one side of the merge.
Note that the meaning of “ours” and “them” just depends on which branch you connect to when you start the merge (“merge update into master” or “merge master into upgrade”, which both produce the same final story). "Ours" is the only branch you are standing on, and "them" are those branches that you specify in the merge command. This is explained in more detail in the manpage.
EDIT: As an explanation: you (most likely) did not have conflicts with the code changes that you made because the wizard did not diverge sufficiently from the general code base. By default, git merge uses a three- git merge strategy that takes the last common ancestor of the two sides that you want to merge, and only really looks at the changes regarding this common ancestor. If only one side of the branch is progressing, Git will recognize that all changes there replace the old code (in your case, the master code), and it will simply use the code from upgrade automatically (that is, it resolves the "conflict" automatically).
A conflict that you must resolve manually will only be raised when both sides of the merge have changed from a common ancestor. In this case, Git does not know which side is "better" - perhaps even the two sides must be combined to work. Therefore, the user is prompted to resolve such conflicts.
Note. The answer was updated because I previously misinterpreted the -s and -X options.
Nevik rehnel
source share