git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Alberto Bertogli <albertito@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Commit cherry-picking
Date: Tue, 3 Apr 2007 01:33:44 -0400	[thread overview]
Message-ID: <20070403053344.GG15922@spearce.org> (raw)
In-Reply-To: <20070403051947.GE15922@spearce.org>

"Shawn O. Pearce" <spearce@spearce.org> wrote:
> 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.

Also `git gui` (or `git citool`) offers this hunk selection feature,
but in a Tcl/Tk based GUI format.  The hunk selection isn't as
powerful as I'd like it to be, but it works well enough that I
haven't bothered to improve upon it.
 
> Or did I miss something?  Note that `git add -i` was added as a
> new feature in Git 1.5.0 (and later).

git-gui also shipped in 1.5.0...

-- 
Shawn.

  reply	other threads:[~2007-04-03  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03  3:42 Commit cherry-picking Alberto Bertogli
2007-04-03  5:19 ` Shawn O. Pearce
2007-04-03  5:33   ` Shawn O. Pearce [this message]
2007-04-03  5:45     ` Alberto Bertogli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070403053344.GG15922@spearce.org \
    --to=spearce@spearce.org \
    --cc=albertito@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).