I am looking for a git command that will do merging of other branch (like develop) into mine with:
- automatic resolving conflicts,
- when there are conflicts that are not possible to resolve with automatic merge, then take my version of changes.
I tried using commands like git merge -s ours but it then takes my changes in all conflicts. And this is not what I want. If for example version of package that I didn't change has been updated on the branch that I am merging into mine, I want obviously this package to be updated.
Any help here much appreciated!
git merge -s recursive -X ours?-s oursdoes not merely take your changes in all conflicts.-s oursdoesn't actually do anything with conflicts, it throws all the changes that the other side made away and just takes your entire tree. It looks like a merge has been done, but the other side's code is not merged at all, it's discarded. This is an incredibly dangerous command and - as you note - it's not what you want. (I wanted to clarify what it does do for future readers who might be inclined to try to use it.)