git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Flatten history

From
HWHilco Wijbenga <hilco.wijbenga@gmail.com>
Date
Jul 30, 2013, 01:42 UTC
Message-ID
<CAE1pOi0CQ1k3h3ie=s3qvkQog9foYBOnJ++uuum-Br7vzQHRSQ@mail.gmail.com>
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?

Cheers, Hilco

P.S. The most annoying thing is that I've done this exact thing before but I can't find what command I used. :-)

Next: Felipe Contreras
Message 1 of 5 in “Flatten history”
  1. Hilco WijbengaJul 30, 2013
  2. Felipe ContrerasJul 30, 2013
  3. Bryan TurnerJul 30, 2013
  4. Hilco WijbengaJul 30, 2013
  5. Hilco WijbengaJul 30, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.