From: "Shawn O. Pearce" <spearce@spearce.org>
To: Steffen Prohaska <prohaska@zib.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] user-manual: mention git gui citool (commit, amend)
Date: Mon, 30 Jul 2007 20:24:48 -0400 [thread overview]
Message-ID: <20070731002448.GV20052@spearce.org> (raw)
In-Reply-To: <11858118802945-git-send-email-prohaska@zib.de>
Steffen Prohaska <prohaska@zib.de> wrote:
> git gui is especially useful because it allows to select diff hunks.
> Now it is at least mentioned in the user-manual.
> +Another approach for creating commits is git gui:
> +
> +-------------------------------------------------
> +$ git gui citool
> +-------------------------------------------------
Actually `git citool` is an alias for `git gui citool`. Because the
former is much faster to type when you want to make a quick commit.
:-)
> +
> +starts the commit tool (Note, "`git gui`" starts the full gui, which
> +provides more options).
But this note is also really useful. So maybe talking about the
longer form in the user manual is a good way to introduce git-gui.
> +Beyond the basic operation of staging and unstaging complete files,
> +git gui can also selectively stage diff hunks. You can do so by
> +selecting a modified or staged file and right-click on the diff view
> +in the lower part of the gui. A pop-up will appear that lets you
> +select a specific hunk and stage or unstage it for the next commit.
> +This is particular useful for slicing large, ugly commits into smaller
> +pieces, for example when cherry-picking (see
> +<<reordering-patch-series>>).
Yes. Now if only someone would teach it how to let you highlight a
section and stage/unstage just the selection. Never mind splitting
a hunk. Selection based stage/unstage would really be cool...
especially when combined with git-stash. Where you could first
stash everything, reset back to the last committed state, then
selectively unstash changes into the working directory, test them,
stage everything for commit, then unstash more, etc...
Since git-stash is modeled as a commit, it could also work for
cherry-picking. Which is very useful when cleaning up a series.
Hmm. Wishlist for git-gui!
> @@ -2480,7 +2498,8 @@ $ gitk origin..mywork &
> And browse through the list of patches in the mywork branch using gitk,
> applying them (possibly in a different order) to mywork-new using
> cherry-pick, and possibly modifying them as you go using commit
> ---amend.
> +--amend. git gui may be especially useful to amend commits as it
> +lets you selectively stage and unstage single diff hunks.
Yes. Except git-gui (currently) destroys the author information
when it does an amend. Bad git-gui! Bad! No prize for you! :-)
--
Shawn.
next prev parent reply other threads:[~2007-07-31 0:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 16:11 [PATCH] user-manual: mention git gui citool (commit, amend) Steffen Prohaska
2007-07-31 0:24 ` Shawn O. Pearce [this message]
2007-08-02 18:18 ` J. Bruce Fields
2007-08-02 22:24 ` Steffen Prohaska
2007-08-02 22:31 ` J. Bruce Fields
2007-08-03 5:08 ` Steffen Prohaska
2007-08-03 12:56 ` J. Bruce Fields
2007-08-05 12:59 ` [PATCH v2] " Steffen Prohaska
2007-08-05 13:58 ` Johannes Schindelin
2007-08-05 14:17 ` Steffen Prohaska
2007-08-05 14:48 ` Johannes Schindelin
2007-08-05 15:03 ` David Kastrup
2007-08-05 19:47 ` Steffen Prohaska
2007-08-06 0:22 ` Johannes Schindelin
2007-08-06 5:20 ` Steffen Prohaska
2007-08-06 9:36 ` Steven Grimm
2007-08-06 11:51 ` Johannes Schindelin
2007-08-05 22:22 ` J. Bruce Fields
2007-08-05 22:25 ` J. Bruce Fields
2007-08-06 0:26 ` Johannes Schindelin
2007-08-06 3:51 ` J. Bruce Fields
2007-08-06 19:36 ` Robin Rosenberg
2007-08-06 19:43 ` J. Bruce Fields
2007-08-03 3:01 ` [PATCH] " Shawn O. Pearce
2007-08-03 12:56 ` J. Bruce Fields
2007-08-04 6:33 ` Shawn O. Pearce
2007-08-05 12:09 ` Steffen Prohaska
2007-08-03 0:05 ` Junio C Hamano
2007-08-03 3:04 ` Shawn O. Pearce
2007-08-03 12:58 ` J. Bruce Fields
2007-08-04 6:20 ` Shawn O. Pearce
2007-08-04 7:44 ` David Kastrup
2007-08-04 14:35 ` J. Bruce Fields
2007-08-05 12:26 ` Steffen Prohaska
-- strict thread matches above, loose matches on Subject: below --
2007-08-06 3:33 Brett Schwarz
2007-08-06 4:06 ` Shawn O. Pearce
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=20070731002448.GV20052@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=prohaska@zib.de \
/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).