Why does git think this is a conflict after cherrypick? -


i using tortoisegit on windows, have 2 branches. when cherrypick commits other branch, quite 'confilict' reports. when tried resolve these 'conflicts', lot of times quite confused , angry (like case in screen shot below), how can conflict? 1 file doesn't have while other file has new lines, couldn't more simppler. why git treat conflict? can explain? thanks..

why marked 'conflict' git?

i've reproduced case there real conflict behind apparent nothing-vs-something non-conflict.

base commit:

foo bar baz 

next commit on master removes baz

foo baz 

next commit on branch adds @ same position

foo spam bar baz 

when try merge branch master, conflict:

foo          <<<<<<< head =======      spam         bar          >>>>>>> plus baz          

apparently false alarm, nothing on master, added on other branch.

but in reality, alarm not false, information put file git false: lists bar, removed on master, added on other branch.

so git buggy, in subtle , surprising way. apparently try fit information >>>>>>>=======<<<<<<< notation, remove-add conflict not fit it, needs additional info merge base. or other way tell "added them" "kept them".


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -