How to force manual merging in Git / IntelliJ if same file but different lines were edited? -
i not sure whether git or intellij problem facing. assuming following using git integration in intellij:
user changes text file , commits , pushes change branch branch1
user b changes same text file but in different line , commits branch1
user b fetches remote repository , merges remote branch1 local branch1
current behavior: merges wihout conflicts (since different lines?)
wanted behavior: conflict resolution window popups , user must decide whether apply none conflicting changes.
but why might want behvaior?: had troubles markup or js files, 1 developer changed @ top (e.g. removed unused function) , developer relying on this. 1 must have costly ui tests if want informed breaks. if markup (e.g. jsf tags, params)
i not sure if want, use --no-commit
option of git merge
command pretend merge failed when there no conflicts. manual:
with --no-commit perform merge pretend merge failed , not autocommit, give user chance inspect , further tweak merge result before committing.
then, can inspect changes git diff
--cached
option inspect results of merge; , use git checkout options --ours
, --theirs
accept or refuse changes introduced merge.
Comments
Post a Comment