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

Cherry pick a commit but with files in another location

From
ASAni Sinha <ani@anirban.org>
Date
Apr 11, 2020, 11:21 UTC
Message-ID
<FC3905FB-D3B9-433D-876D-8DB68D3491C3@anirban.org>
Hi,
I have an use case where I need to cherry pick a change from one branch to another. The change will apply cleanly but the files in the branch  where I want to cherry pick the co mit to have been moved under a different directory. So simple cherry pick will result in conflicts. Is there a clean way to cherry pick in this case? Is there an option to provide -p0, -p1 etc to the patch?

Thanks Ani

Next: Martin Ågren
Message 1 of 5 in “Cherry pick a commit but with files in another location”
  1. Ani SinhaApr 11, 2020
  2. Martin ÅgrenApr 11, 2020
  3. Martin ÅgrenApr 11, 2020
  4. Ani SinhaApr 11, 2020
  5. Martin ÅgrenApr 13, 2020

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.