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

Re: [PATCH] user-manual: mention git gui citool (commit, amend)

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 31, 2007, 00:24 UTC
Message-ID
<20070731002448.GV20052@spearce.org>
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.
Show 5 quoted lines
> +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.

Show 8 quoted lines
> +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!

Show 7 quoted lines
> @@ -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.
Previous: Steffen ProhaskaNext: J. Bruce Fields
Message 2 of 34 in “user-manual: mention git gui citool (commit, amend)”
  1. user-manual: mention git gui citool (commit, amend)Steffen Prohaska, Jul 30, 2007
  2. Shawn O. PearceJul 31, 2007
  3. J. Bruce FieldsAug 2, 2007
  4. Steffen ProhaskaAug 2, 2007
  5. J. Bruce FieldsAug 2, 2007
  6. Steffen ProhaskaAug 3, 2007
  7. J. Bruce FieldsAug 3, 2007
  8. user-manual: mention git gui citool (commit, amend)Steffen Prohaska, Aug 5, 2007
  9. Johannes SchindelinAug 5, 2007
  10. Steffen ProhaskaAug 5, 2007
  11. Johannes SchindelinAug 5, 2007
  12. David KastrupAug 5, 2007
  13. Steffen ProhaskaAug 5, 2007
  14. Johannes SchindelinAug 6, 2007
  15. Steffen ProhaskaAug 6, 2007
  16. Steven GrimmAug 6, 2007
  17. Johannes SchindelinAug 6, 2007
  18. J. Bruce FieldsAug 5, 2007
  19. J. Bruce FieldsAug 5, 2007
  20. Johannes SchindelinAug 6, 2007
  21. J. Bruce FieldsAug 6, 2007
  22. Robin RosenbergAug 6, 2007
  23. J. Bruce FieldsAug 6, 2007
  24. Shawn O. PearceAug 3, 2007
  25. J. Bruce FieldsAug 3, 2007
  26. Shawn O. PearceAug 4, 2007
  27. Steffen ProhaskaAug 5, 2007
  28. Junio C HamanoAug 3, 2007
  29. Shawn O. PearceAug 3, 2007
  30. J. Bruce FieldsAug 3, 2007
  31. Shawn O. PearceAug 4, 2007
  32. David KastrupAug 4, 2007
  33. J. Bruce FieldsAug 4, 2007
  34. Steffen ProhaskaAug 5, 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.