git - Automatically resolve merge conflicts -


i use git + jenkins + gerrit. , how automatically resolve merge conflicts? see status in webui "submitted, merge pending".

i tried submit type: fast-forward, merge if necessary, rebase if necessary, merge, cherry pick. no 1 doesn't solve problem. see "submitted, merge pending"

to extent have automatic merge conflict resolution, git merge does. doesn't work.

when 2 people change same line in file in different ways, git has no idea how determine change or how combine changes. need provide direction correct state of file. thing.

you don't want have automatic merge resolution on merges. having runs risk of merge being done incorrectly , build being incredibly broken because of it. when have conflicts, want set of human eyes looking @ changes , deciding correct course of action.

your actual problem 1 of branching , management. want set branches , merges minimize number of conflicts occur. try avoid having multiple people working in same area @ same time. if isn't possible, put them on same branch sharing code , getting each others changes regularly. have 1 person rebase , submit change gerrit , jenkins.


Comments