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

Re: as promised, docs: git for the confused

From
Linus Torvalds <torvalds@osdl.org>
Date
Dec 12, 2005, 16:34 UTC
Message-ID
<Pine.LNX.4.64.0512120827440.15597@g5.osdl.org>
In-Reply-To
<7vmzj9zwfu.fsf@assigned-by-dhcp.cox.net>
On Fri, 9 Dec 2005, Junio C Hamano wrote:
Show 7 quoted lines
>
> Exactly.  That's why task oriented list would be most useful.
> Here is a starter.
> 
> 
> Everyday GIT Cheat Sheet Or Git With 20 Commands
> ================================================
Would this file perhaps also have examples?

I really think a lot of people learn better from examples than from having pointers to git programs that can be useful.

For example, earlier today I got the bash tar-ball because I had forgotten what the magic config option was to make bash do the right thing wrt pipe write errors. And because I'm totally dependent on "git grep" these days, I turned that tar-ball into a git archive. It's really a sinfully simple thing to do, but I don't think we mention that anywhere in the docs.

Here's what I did:
	# Extract the thing as normal
	zcat < bash-3.0.tar.gz | tar xvf -
	cd bash-3.0/
	# make a git archive out of it
	git init-db
	git add .
	git commit

and that's it. That creates a git archive from a tar-ball. Very simple, and short sequences like these would make tons of sense for a "cheat sheet" like yours, and I really think most people can look at those three git commands and suddenly they understand what they do a lot better than by reading the man-pages.

Or maybe it's just me. But I know _I_ understand things better by seeing the "context" that they are used in. Then I go to man-pages later on, if I want to know the details.

No?
		Linus
Previous: Junio C HamanoNext: Timo Hirvonen
Message 8 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.