Re: [FAQ?] Rationale for git's way to manage the index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2007-05-08 08:40:27 -0400, J. Bruce Fields wrote:

> On Tue, May 08, 2007 at 12:28:36PM +0200, Karl Hasselström wrote:
>
> > I think it would be worth introducing git-gui as a commit tool in
> > the tutorial(s) and the manual. It gives a very nice graphical
> > representation of the dirty state you're going to commit, and the
> > dirty state you aren't going to commit because you haven't staged
> > it yet. The only drawback is that it's a lot of work to make
> > documentation with screenshots ...
>
> For the tutorial and user manual, could git-gui be treated similar
> gitk, with just a one- or two- line mention here and there? I
> haven't used it, so don't know where it would most logically fit
> in....

I would introduce it with a paragraph or two right where committing is
covered the first time. Explain that the empty file list box to the
left contains the changes that will be committed when you press the
commit button, and that the file list box on the right contains the
changes that won't be committed. By clicking on a file name you get to
see the diff to the file, and by clicking on the icon you move it to
the other file list box -- that is, you stage/unstage it.

And now comes the clever part: Introduce the index, by explaining that
it essentially _is_ the left file list box. Explain that git-add is
the command-line equivalent of moving changes to the left box, and
that git-commit without arguments simply commits what's in the index
-- exactly like git-gui's Commit button.

I think it could work. :-)

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux