git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Aguilar <davvid@gmail.com>
To: John Lee <jjl@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Staging commits with visual diff tools?
Date: Sat, 30 May 2015 18:59:57 -0700	[thread overview]
Message-ID: <20150531015956.GA64502@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1505262147230.3709@alice>

On Tue, May 26, 2015 at 09:50:49PM +0100, John Lee wrote:
> Hi
> 
> Does anybody have code to stage commits using a the visual
> diff/merge tools supported by git-difftool?  Is there support in git
> itself somewhere, even?
> 
> I'm looking for something functionally similar to git add -p
> 
> Looking at the git-difftool source I can see how to write a command
> to do it, but wanted to check if it had already been implemented.
> 
> Did I miss a way that already exists?
> 
> Thanks
> 
> 
> John

If you're interested in existing staging tools then I would
highly suggest looking at git-cola.

    https://github.com/git-cola/git-cola

    git clone git://github.com/git-cola/git-cola.git

git-cola is free software so it's pretty unique in many ways.
I also wrote it, so that makes it that much more awesome ;-)

cola has a very slick interactive staging editor, interactive
rebase, and a whole lot more.

I'm a g/vim user, so git-cola is finely tuned for keyboard
usage.  If we implement these feature in Git, we should consider
providing the same workflows/hotkeys as cola.

For staging, you can select lines, hit "s", and they'll be
staged/unstaged.  ctrl-u reverts unstaged edits, etc.
The '?' hotkey shows the help, etc.

You can get extremely granular, moreso then "add -p", which is
why it exists.  When cola's diff editor is not sufficient, you
can also use it to drive difftool, but only in ways that you can
on the command-line already.

git-cola is written in Python(2+3) so it's easy to hack on, and
quite portable.

cheers,
-- 
David

  parent reply	other threads:[~2015-05-31  2:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 20:50 Staging commits with visual diff tools? John Lee
2015-05-27  7:28 ` Jeff King
2015-05-27  7:34   ` John Lee
2015-05-29  9:57     ` Michael J Gruber
2015-05-31  1:59 ` David Aguilar [this message]
2015-05-31  9:36   ` John Lee
2015-06-01  2:25     ` David Aguilar
2015-06-01 19:36       ` John Lee
2015-06-27 23:23         ` John Lee
2015-06-28 17:56           ` John Lee

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20150531015956.GA64502@gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jjl@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).