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

Re: as promised, docs: git for the confused

From
Llinux@horizon.com <linux@horizon.com>
Date
Dec 10, 2005, 10:56 UTC
Message-ID
<20051210105609.9994.qmail@science.horizon.com>
In-Reply-To
<7v7jadwfdj.fsf@assigned-by-dhcp.cox.net>
Show 7 quoted lines
> I do not necessarily agree with this claim that merging is the
> whole story about index.  As the steps in the hello/example
> tutorial demonstrate, index is used to build up what you will
> commit incrementally, and you can use this facility to view your
> changes incrementally.
> 
> Your workflow could be like this:
(Good example)
> This is sometimes very useful, and I suspect your comment about
> "commit -a will take care of everything, so you do not need to
> know about update-index" is coming from your ignoring this
> aspect of update-index.

Well, yes and no. I'm quite aware that the index can be used that way, but I'm less certain it's a good idea.

I have often wished for a very lightweight "snapshot" feature that I could (say) put in a Makefile at the end of every successful compile. I don't want to share those snapshots with the world, and I'll delete them next "real" commit, but they'll help me recover if I fumble-finger something.

Think of it as an undo feature. (With, of course, additional features like the ability to see diffs between various stages.)

You can use the index as a one-level undo feature in a similar way. Or maybe, since it's manual, its like hitting save from an editor. Either way, the fact that it's only one level means that I have to think about what I'm throwing away when I use it, which is somewhat annoying.

Add that to the fact that it's unlike other version control systems (including cogito) which go straight from the working directory into the history, and I thought it better do downplay it.

Certainly I think that people will *usually* just "git-commit -a" to commit their current version. Edit, compile, test, commit. Except in unusual cases, I want the commit to reflect what I just tested.

Using git-update-index in the meantime is an optional extra.
Previous: Junio C Hamano
Message 28 of 28 in “Re: as promised, docs: git for the confused”
  1. linux@horizon.comDec 9, 2005
  2. Petr BaudisDec 9, 2005
  3. linux@horizon.comDec 9, 2005
  4. Randy.DunlapDec 9, 2005
  5. Junio C HamanoDec 9, 2005
  6. linux@horizon.comDec 9, 2005
  7. Junio C HamanoDec 9, 2005
  8. Linus TorvaldsDec 12, 2005
  9. Timo HirvonenDec 12, 2005
  10. Linus TorvaldsDec 12, 2005
  11. Randal L. SchwartzDec 12, 2005
  12. Joshua N PritikinDec 13, 2005
  13. Randal L. SchwartzDec 13, 2005
  14. Junio C HamanoDec 13, 2005
  15. Linus TorvaldsDec 13, 2005
  16. H. Peter AnvinDec 13, 2005
  17. Junio C HamanoDec 13, 2005
  18. Randal L. SchwartzDec 13, 2005
  19. Tip of the day: archaeologyJunio C Hamano, Dec 13, 2005
  20. Linus TorvaldsDec 13, 2005
  21. Junio C HamanoDec 13, 2005
  22. Junio C HamanoDec 12, 2005
  23. Everyday: some examples.Junio C Hamano, Dec 13, 2005
  24. Petr BaudisDec 9, 2005
  25. linux@horizon.comDec 9, 2005
  26. Junio C HamanoDec 10, 2005
  27. Junio C HamanoDec 10, 2005
  28. linux@horizon.comDec 10, 2005

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.