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

Re: Create a new commit from patches without using any worktree?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 27, 2010, 02:58 UTC
Message-ID
<20101027025816.GA1338@burratino>
In-Reply-To
<AANLkTi=Xi13_0+bC-TVRP3uVDmGWVdM3a708=SSzCR88@mail.gmail.com>
Hi Klas,
Klas Lindberg wrote:
> Is there any way to record a new commit based on contents in a patch
> without going through a worktree?

Not sure if there a user-friendly way to do this, but if you are scripting, I'd suggest looking into "git read-tree", "git apply --cached", "git write-tree", "git commit-tree", and GIT_INDEX_FILE.

Hope that helps, Jonathan

Previous: Klas LindbergNext: Johannes Sixt
Message 2 of 5 in “Create a new commit from patches without using any worktree?”
  1. Klas LindbergOct 27, 2010
  2. Jonathan NiederOct 27, 2010
  3. Johannes SixtOct 27, 2010
  4. Bert WesargOct 27, 2010
  5. Klas LindbergOct 27, 2010

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.