Merge or Cherry-Pick?

John Tapsell johnflux at gmail.com
Wed Feb 2 05:58:35 GMT 2011


> But how would a similar work flow except there are multiple fixes
> present in the local repo ? How would you push only a single fix in
> such case ?

git rebase -i origin   #Bring up a list of your changes.

<Reorder them in the editor so that the commit you want to push is at
the top of the list, save>

<Fix any conflicts that might have arisen because you reordered the commits>

git pull --rebase   #make sure we are up to date

git log      #copy the SHA of the commit you want to push up to

git push origin SHA:head   #paste the SHA that you just copied where I
wrote "SHA"


Does that make sense?  There are other ways to do it, but this way
avoids most of the common problems.

John




More information about the kde-core-devel mailing list