Cherrypicking versus Rebasing

Posted by Lakshman Prasad on Stack Overflow See other posts from Stack Overflow or by Lakshman Prasad
Published on 2010-06-11T11:46:09Z Indexed on 2010/06/11 12:03 UTC
Read the original article Hit count: 351

Filed under:
|
|
|

The following is a scenario I commonly face:

You have a set of commits on master or design, that I want to put on top of production branch.

I tend to create a new branch with the base as production cherry-pick these commits on it and merge it to production

Then when I merge master to production, I face merge conflicts because even tho the changes are same, but are registered as a different commit because of cherry-pick.

I have found some workarounds to deal with this, all of which are laborious and can be termed "hacks".

Altho' I haven't done too much rebasing, I believe that too creates a new commit hash.

Should I be using rebasing where I am cherrypicking. What other advantages does that have over this.

© Stack Overflow or respective owner

Related posts about git

Related posts about rebase