From: David Aguilar <davvid@gmail.com>
To: Cameron Steffen <cam.steffen94@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Stage or discard a hunk at a time?
Date: Sun, 28 Apr 2019 01:47:18 -0700 [thread overview]
Message-ID: <20190428084718.GA21060@gmail.com> (raw)
In-Reply-To: <CAAVFnNminTx_z9Y=jhzDnT0n5_zGD_k2SA84HQqMvKHJSvKcSA@mail.gmail.com>
On Wed, Jan 16, 2019 at 01:09:03PM -0600, Cameron Steffen wrote:
> Hello,
>
> I have this feature idea for git. There should be a command that
> effectively combines git add -p and git checkout -p so that I can
> navigate changed hunks and either stage or discard them.
>
> There is already a SO question asking about this exactly...
> https://stackoverflow.com/questions/11538650/simultaneously-git-add-p-and-git-checkout-p
>
> Has this been discussed before? Is this a reasonable request? If so, I
> might look into contributing the change myself.
>
> Cameron
Install Git Cola.
It's a powerful Git GUI with a keyboard-centric workflow.
You can do this completely through keyboard shortcuts
(or a mouse if you prefer).
Typically:
$ git cola
ctrl-k: focus the status widget
j,k: navigate up/down the file list
ctrl-s: stage files
ctrl-u: revert files to index
ctrl-j: focus the diff widget to operate at the line/hunk level
j, k: move the cursor up/down lines, hold shift to select lines
s: to stage selection, or current hunk if no lines are selected
ctrl-u: revert the selection, or current hunk, to match the index
https://github.com/git-cola/git-cola
https://git-cola.github.io/downloads.html
--
David
prev parent reply other threads:[~2019-04-28 8:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 19:09 Stage or discard a hunk at a time? Cameron Steffen
2019-04-22 19:28 ` Jeff King
2019-04-30 23:19 ` Johannes Schindelin
2019-04-28 8:47 ` David Aguilar [this message]
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=20190428084718.GA21060@gmail.com \
--to=davvid@gmail.com \
--cc=cam.steffen94@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.
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).