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

Re: Commit cherry-picking

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 3, 2007, 05:19 UTC
Message-ID
<20070403051947.GE15922@spearce.org>
In-Reply-To
<20070403034234.GB24722@gmail.com>
Alberto Bertogli <albertito@gmail.com> wrote:
> I often use darcs, and one feature I miss when I use git is the ability
> to do cherry-picking on what I'm about to commit.
Have you tried:
	git add -i
	git commit
?

The `git add -i` flag starts up an interactive tool that you can use to add patch hunks to the index, staging them for the next commit. Running commit with no arguments will then commit exactly what is in the index, leaving the other hunks beind in the working directory.

Or did I miss something? Note that `git add -i` was added as a new feature in Git 1.5.0 (and later).

-- 
Shawn.
Previous: Alberto BertogliNext: Shawn O. Pearce
Message 2 of 4 in “Commit cherry-picking”
  1. Alberto BertogliApr 3, 2007
  2. Shawn O. PearceApr 3, 2007
  3. Shawn O. PearceApr 3, 2007
  4. Alberto BertogliApr 3, 2007

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.