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

Re: Cherry pick a commit but with files in another location

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Apr 13, 2020, 05:43 UTC
Message-ID
<CAN0heSp+Lmyx=eGjjioCYc6dmncz4Dcwo-MCsfMMKbP6vKdOzQ@mail.gmail.com>
In-Reply-To
<AE1E8050-EF04-47A0-96E0-27EEC4A0C013@anirban.org>
On Sat, 11 Apr 2020 at 15:25, Ani Sinha <ani@anirban.org> wrote:
Show 6 quoted lines
>
> > On Apr 11, 2020, at 6:13 PM, Martin Ågren <martin.agren@gmail.com> wrote:
> >
> > Do you use "git cherry-pick", "git am" or "git apply"?
>
> Yes
I still don't understand exactly what it is you're doing.
Show 7 quoted lines
> > (Or
> > something else entirely?) Are you aware of "-p<n>" for "git apply"
> > (and "--directory=<root>"?) and are wondering what similar options are
> > available with "git cherry-pick"?
>
> Yes was wondering if similar options exist for cherry pick. I wanted
> to use cherry-pick  so that cherry picks can be tracked by git.

Are you working on some repo that is publicly available, e.g., on github/gitlab? If so, you could post a link.

What is it that you try doing? You could post the commands you execute.
What happens? You could post error messages.

What do you expect *should* happen? You could try to describe your expectations.

Without that kind of information, it is unfortunately hard to help you.

One final thought: Have you actually tried cherry-picking the way you want to, and have you actually encountered a problem? Or are you looking for solutions to a problem that you're not sure you're having?

Martin
Previous: Ani Sinha
Message 5 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.