Re: Flatten history
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jul 30, 2013, 03:50 UTC
- Message-ID
- <CAMP44s2pXSN2HbpGLW9jrgJAypbLM3JtgD+nyK7LkNdvH4nsfQ@mail.gmail.com>
- In-Reply-To
- <CAE1pOi0CQ1k3h3ie=s3qvkQog9foYBOnJ++uuum-Br7vzQHRSQ@mail.gmail.com>
On Mon, Jul 29, 2013 at 8:42 PM, Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote:
Show 18 quoted lines
> Hi all, > > I have a (public) "feature" branch that has been kept up-to-date with > "master" by regularly merging master back into it. I would now like to > get all the changes from feature but not any of the commits. > Basically, I want to replay all of feature's commits without creating > those commits. > > I thought something like > > git cherry-pick -n abcd^..feature > > should do the trick (while on master, where abcd is the SHA-1 of the > commit where feature was created) but I get conflicts. > > First, why the conflicts? I have done all the merges so cherry-pick > should simply be able to replay them? Second, what is the correct way > of doing this?
Perhaps
% git cherry-pick -n --no-merges --right-only --topo-order --cherry-pick abcd^..feature
-- Felipe Contreras