git: Conflict upon merging back a cherry-picked commit -


i've made commit a branch bugfix, cherry picked commit branch develop. made change b bugfix branch touching areas of code around made in commit a. when merged origin/develop branch bugfix git has indicated conflict around lines. error in git or intentional design? mean: changes caused faux conflict originated on bugfix branch , branch had commit a.

unlike when merge, a cherry-picked commit not same commit anymore, new commit contains same changes (look @ hash of cherry picked commit , campare original one). thus, changes on code affected cherry-picked commit, in of 2 branches, result in merge conflict when merge both branches together. actually, git if have done changes in independent way on 2 branches , in different way (since changed code of cherry-picked commit afterwards).

if don't change code affected cherry pick in of 2 branches before merging them together, git see 2 different commits, same changes. in case no merge conflict shown.

please note, commit more changes contains. it's date have done changes, commit message, parent commit, etc. way new commit created.

this why should avoid using cherry-picks if there other ways achieving need.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -