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

Re: GIT vs Other: Need argument

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 19, 2007, 20:57 UTC
Message-ID
<alpine.LFD.0.98.0704191341370.9964@woody.linux-foundation.org>
In-Reply-To
<4627ABBB.8060709@softax.com.pl>
On Thu, 19 Apr 2007, Marcin Kasperski wrote:
Show 16 quoted lines
> > 
> > I agree. And to some degree I suspect that the documentation pushes some of
> > the advanced things a bit *too* eagerly. (...)
>
> As I am among those, who think that git *is* complicated, I decided to 
> sit down, and find out why exactly I think so. Here are the top 
> words/options/concepts, which I faced almost immediately while trying 
> GIT, and which I find confusing:
> 
> rebase
> index
> revtree
> reset
> ref / refs
> rev-list
> rev-parse

Yes. I think it might be a good idea to write some kind of tutorial aimed for two very simple cases. Because there are really two cases that stand out as being (a) common and (b) something you start out with!

 - Case #1 would be using git basically as a "anonymous CVS" replacement 
   to track somebody others project.
   None of the above are ever really needed for that case, and I think all 
   you really want to learn is:
	git clone
	git pull
	gitk
	git log HEAD@{2.days.ago}..
	gitk HEAD@{1}.. some-file-or-directory
   and not a whole lot more (maybe pointing them at gitweb repos and 
   telling them what the thing can do).  In other words, you want to teach 
   people to just fetch the repo, and perhaps how to see what has changed 
   lately.
   In an advanced section for this usage case might be things like
	git bisect
   to teach people who track other peoples repository how to help those 
   other people find bugs when something goes wrong. But that would 
   literally be an "advanced topic".
 - Case #2 is the "how to start tracking your own project".
   In some ways, it's even *more* trivial, becuase if you start a new 
   project, you usually start from scratch (or perhaps from some CVS 
   import), with just one branch, and your first worry is not even how to 
   export it yet, but how to just *use* it for development.
   So for case #2, we'd never even mention "git clone/pull" or branches, 
   but instead we'd just talk about
	git init	(and "git cvsimport" or something)
	git add/rm/commit
	git diff/show
	git reset
	git checkout
   and walk through an everyday problem set of just some _very_ basic 
   situations. Explain the whole "content" thing, so that people 
   understand why "git add <filename>" + "git diff" doesn't actually show 
   the filename at all, and what the difference between "git diff" and 
   "git diff HEAD" is.

Those two usage cases actually cover a lot of trivial CVS usage already. A lot of people probably don't need to learn about branches AT ALL, or about concurrent development, or anything like that.

And the good news is that once you are very comfy with the two trivial cases, it's much easier to *later* explain how those two can actually be combined. In other words, there's probably not any reason at all to even start to talk about merging and branches until people are actually ready for it, and start asking you "so what happens if I've made changes and want to update to the most recent version".

Similarly, you generally don't want to actually start serving your projects to others until long after you've started using the thing for development, so early on, it's probably perfectly fine to tell people: don't worry about setting up a server or gitweb, just be happy in the knowledge that it *can* be done, and has been done for big projects, so when you actually want to do that, you can do all these fancy things, but you shouldn't worry about it _yet_.

			Linus
Previous: Marcin KasperskiNext: Carl Worth
Message 40 of 120 in “GIT vs Other: Need argument”
  1. Pietro MascagniApr 17, 2007
  2. Matthieu MoyApr 17, 2007
  3. Andy ParkinsApr 17, 2007
  4. Alex RiesenApr 17, 2007
  5. Martin LanghoffApr 17, 2007
  6. Linus TorvaldsApr 17, 2007
  7. Matthieu MoyApr 17, 2007
  8. Martin LanghoffApr 17, 2007
  9. Alex RiesenApr 17, 2007
  10. Dana HowApr 25, 2007
  11. Alex RiesenApr 25, 2007
  12. Tomash BrechkoApr 17, 2007
  13. Guilhem BonnefilleApr 17, 2007
  14. Andy ParkinsApr 17, 2007
  15. Shawn O. PearceApr 17, 2007
  16. Marcin KasperskiApr 17, 2007
  17. Johannes SchindelinApr 18, 2007
  18. Linus TorvaldsApr 18, 2007
  19. Nicolas PitreApr 18, 2007
  20. Bill LearApr 18, 2007
  21. Matthieu MoyApr 18, 2007
  22. Nicolas PitreApr 18, 2007
  23. Matthieu MoyApr 19, 2007
  24. Petr BaudisApr 19, 2007
  25. Matthieu MoyApr 20, 2007
  26. Theodore TsoApr 18, 2007
  27. Guilhem BonnefilleApr 18, 2007
  28. Linus TorvaldsApr 18, 2007
  29. Daniel BarkalowApr 18, 2007
  30. Michael K. EdwardsApr 18, 2007
  31. Johannes SchindelinApr 19, 2007
  32. Matthieu MoyApr 19, 2007
  33. Johannes SchindelinApr 19, 2007
  34. Alex RiesenApr 19, 2007
  35. Christian MICHONApr 19, 2007
  36. Johannes SchindelinApr 19, 2007
  37. Christian MICHONApr 19, 2007
  38. Linus TorvaldsApr 19, 2007
  39. Marcin KasperskiApr 19, 2007
  40. Linus TorvaldsApr 19, 2007
  41. Carl WorthApr 23, 2007
  42. Josef WeidendorferApr 23, 2007
  43. Carl WorthApr 23, 2007
  44. Junio C HamanoApr 23, 2007
  45. Carl WorthApr 23, 2007
  46. Linus TorvaldsApr 23, 2007
  47. Brian GernhardtApr 23, 2007
  48. Daniel BarkalowApr 24, 2007
  49. Junio C HamanoApr 24, 2007
  50. J. Bruce FieldsApr 24, 2007
  51. Linus TorvaldsApr 24, 2007
  52. J. Bruce FieldsApr 30, 2007
  53. Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)Carl Worth, Apr 25, 2007
  54. Carl WorthApr 25, 2007
  55. Linus TorvaldsApr 25, 2007
  56. Carl WorthApr 25, 2007
  57. Nicolas PitreApr 25, 2007
  58. Carl WorthApr 25, 2007
  59. Junio C HamanoApr 25, 2007
  60. Nicolas PitreApr 25, 2007
  61. Carl WorthApr 25, 2007
  62. Nicolas PitreApr 25, 2007
  63. Linus TorvaldsApr 25, 2007
  64. Daniel BarkalowApr 25, 2007
  65. Junio C HamanoApr 25, 2007
  66. Linus TorvaldsApr 25, 2007
  67. Nicolas PitreApr 25, 2007
  68. Daniel BarkalowApr 25, 2007
  69. Carl WorthApr 25, 2007
  70. Daniel BarkalowApr 25, 2007
  71. Nicolas PitreApr 25, 2007
  72. Junio C HamanoApr 23, 2007
  73. Johannes SchindelinApr 19, 2007
  74. History cleanup/rewriting script for gitJan Harkes, Apr 20, 2007
  75. Johannes SchindelinApr 20, 2007
  76. Petr BaudisApr 20, 2007
  77. Jan HarkesApr 20, 2007
  78. Marcin KasperskiApr 19, 2007
  79. Johannes SchindelinApr 19, 2007
  80. Marcin KasperskiApr 19, 2007
  81. Johannes SchindelinApr 19, 2007
  82. J. Bruce FieldsApr 19, 2007
  83. Theodore TsoApr 19, 2007
  84. [ANNOUNCE] Cogito is for salePetr Baudis, Apr 19, 2007
  85. Matthieu MoyApr 19, 2007
  86. Junio C HamanoApr 19, 2007
  87. Johannes SchindelinApr 19, 2007
  88. Guilhem BonnefilleApr 18, 2007
  89. Andy ParkinsApr 18, 2007
  90. Steven GrimmApr 18, 2007
  91. Jakub NarebskiApr 19, 2007
  92. Steven GrimmApr 19, 2007
  93. Jakub NarebskiApr 19, 2007
  94. Johannes SchindelinApr 19, 2007
  95. Julian PhillipsApr 19, 2007
  96. Steven GrimmApr 19, 2007
  97. Johannes SchindelinApr 19, 2007
  98. Junio C HamanoApr 19, 2007
  99. Junio C HamanoApr 19, 2007
  100. Steven GrimmApr 19, 2007
  101. Junio C HamanoApr 19, 2007
  102. Shawn O. PearceApr 20, 2007
  103. Jakub NarebskiApr 20, 2007
  104. Karl HasselströmApr 20, 2007
  105. Junio C HamanoApr 20, 2007
  106. Petr BaudisApr 20, 2007
  107. Junio C HamanoApr 20, 2007
  108. Steven GrimmApr 20, 2007
  109. Yann DirsonApr 18, 2007
  110. Sam VilainApr 18, 2007
  111. Yann DirsonApr 18, 2007
  112. Dana HowApr 25, 2007
  113. Marcin KasperskiApr 19, 2007
  114. Alex RiesenApr 19, 2007
  115. Andy ParkinsApr 19, 2007
  116. Shawn O. PearceApr 20, 2007
  117. Eric BlakeApr 20, 2007
  118. Johannes SchindelinApr 19, 2007
  119. Marcin KasperskiApr 19, 2007
  120. Johannes SchindelinApr 19, 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.