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

Re: Recording cherry-picked commits

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 23, 2008, 12:11 UTC
Message-ID
<alpine.LSU.1.00.0803231309370.4353@racer.site>
In-Reply-To
<ae63f8b50803230407u7062586dy26fab7d98090efb9@mail.gmail.com>
Hi,
On Sun, 23 Mar 2008, Jean-Baptiste Quenot wrote:
Show 12 quoted lines
> 2008/3/22, Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:
> > On 22/03/2008, Jean-Baptiste Quenot <jbq@caraldi.com> wrote:
> >  > What about using a hidden ".gitcherry" file in the current branch 
> >  > to store the commits that have been applied?  With the simple shell 
> >  > scripts below I'm able to achieve the same effect as svnmerge:
> >
> > (.gitcherry should really be at the root of the git repository, not in 
> > the current directory)
> 
> Yes that's what I meant.  Usually I'm always at the root when I'm 
> cherry-picking changes but you're right the script could be improved in 
> this regard.  Is there a trick to find the root repository directory?

Actually, you should not store it in the root of the working tree, but in the git dir (because it should never be tracked!), and then you can make it non-hidden:

	file="$(git rev-parse --git-dir)"/cherry
Show 6 quoted lines
> > What happens to .gitcherry across merges ?  I think your solution 
> > isn't robust enough.
> 
> The .gitcherry is merged like any other file.  I'm just trying to
> mimic svnmerge here, not to reinvent anything.  As Git does not have
> file metadata, I'm using a plain text file to achieve this.

Ah, I see, so you _want_ to track it. I do not like this idea personally, but then, I will not use .gitcherry anyway.

	file="$(git rev-parse --show-cdup)"/.gitcherry

Hth, Dscho

Previous: Jean-Baptiste QuenotNext: Rafael Garcia-Suarez
Message 6 of 8 in “Recording cherry-picked commits”
  1. Jean-Baptiste QuenotMar 21, 2008
  2. Jean-Baptiste QuenotMar 22, 2008
  3. Rafael Garcia-SuarezMar 22, 2008
  4. Junio C HamanoMar 23, 2008
  5. Jean-Baptiste QuenotMar 23, 2008
  6. Johannes SchindelinMar 23, 2008
  7. Rafael Garcia-SuarezMar 23, 2008
  8. Johannes SchindelinMar 23, 2008

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.