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

Re: Newbie grief

From
IBIllia Bobyr <ibobyr@blizzard.com>
Date
May 4, 2012, 17:17 UTC
Message-ID
<4FA40F2A.7070109@blizzard.com>
In-Reply-To
<CA+7g9Jx20q6C8JqrcrmbWhYNH1K35Gwp_BAckjM=8qg1kMwU4Q@mail.gmail.com>
On 5/4/2012 9:46 AM, Nathan Gray wrote:
Show 51 quoted lines
> On Fri, May 4, 2012 at 3:09 AM, Carlos Martín Nieto<cmn@elego.de>  wrote:
>> On Thu, 2012-05-03 at 22:25 -0700, Junio C Hamano wrote:
>>> Michael Witten<mfwitten@gmail.com>  writes:
>>>
>>>> As for a seemingly conservative suggestion, how about using a little
>>>> more structural white space:
>>>>
>>>>    To $uri_for_central_repo
>>>>     ! [rejected]        HEAD ->  feature_0 (non-fast-forward)
>>>>
>>>>    error: failed to push some refs to '$uri_for_central_repo'
>>>>
>>>>    To prevent you from losing history, non-fast-forward updates were rejected
>>>>    Merge the remote changes (e.g. 'git pull') before pushing again.  See the
>>>>    'Note about fast-forwards' section of 'git push --help' for details.
>>>>
>> Most of the first sentence repeats what we can see above. Restating that
>> non-ff updates were rejected doesn't add information and doesn't help
>> people who don't already know what a non-ff update is, so it's either
>> redundant or not helpful[0]. So lets see if we can come up with a
>> friendlier way of saying it. Maybe something like:
>>
>>     To $uri_for_central_repo
>>     ! [rejected]        HEAD ->  feature_0 (non-fast-forward)
>>
>>     error: failed to push some refs to '$uri_for_central_repo'
>>
>>     Some updates which might rewrite history and lose someone else's
>>     changes were rejected. Merge those changes (e.g. 'git pull') to
>>     incorporate that history. See the 'Note about fast-forwards' section
>>     of 'git push --help' for details.
>>
>> It may be a bit longer, but if you don't know what a non-ff is or why
>> it's a problem, this text should help you a lot more than the previous
>> one did. Not reading the documentation (specially when the error message
>> points you to a specific section for a longer explanation) is still no
>> excuse for not known what's going on, but if you've been working on your
>> own for a while, you might have forgotten what this is all about.[1]
> The whitespace that Michael introduced is a big help, for starters,
> and this rewording is also a nice step forward.  I'm still not
> thrilled about the "rewriting history" verbiage -- that makes it sound
> like the user did something super risky and was rescued by the system.
>   Here's my suggestion for replacing the last paragraph:
>
>    Some of your branches are out of date.  Merge the remote changes
> (e.g. 'git pull') then try again.
>
> It's short and easy to scan.  It has no git-specific jargon that new
> users would be unfamiliar with.  There's no reference to fast-forward
> updates so no need to refer the user to that help section.  What do
> you think?

Not everybody is a new user :) Throwing away a precise explanation for the purpose of avoiding a possible confusion for someone who either just started (and will have to learn the terms anyway) or for someone who does not really care to learn is a decision that I would weight very carefully.

Just as I side note, I lead a team of an ordinary developers through a transition from CVS to Git and there were pretty much fine with the fact that there are pieces in such a complex system as Git that they do not understand immediately. Over a couple of month everyone who cared or required this knowledge knew what a fast-forward is. And people who did not care just learn to do git pull as the message suggests.

I think that a reference to the documentation is very nice. I remember that this kind of references allowed me to learn Git gradually as I was facing different usage scenarios instead of reading the whole documentation for all the tools.

Previous: Nathan GrayNext: Rich Pixley
Message 89 of 100 in “Newbie grief”
  1. Rich PixleyApr 30, 2012
  2. Seth RobertsonApr 30, 2012
  3. Rich PixleyMay 1, 2012
  4. Junio C HamanoMay 1, 2012
  5. Rich PixleyMay 1, 2012
  6. Sitaram ChamartyMay 1, 2012
  7. Ted Ts'oMay 1, 2012
  8. Sitaram ChamartyMay 1, 2012
  9. Rich PixleyMay 1, 2012
  10. Michael WittenMay 1, 2012
  11. Rich PixleyMay 1, 2012
  12. Jakub NarebskiMay 2, 2012
  13. Randal L. SchwartzMay 1, 2012
  14. Rich PixleyMay 1, 2012
  15. Randal L. SchwartzMay 1, 2012
  16. Junio C HamanoMay 1, 2012
  17. Rich PixleyMay 1, 2012
  18. Randal L. SchwartzMay 1, 2012
  19. Rich PixleyMay 1, 2012
  20. Michael WittenMay 1, 2012
  21. Philip OakleyMay 1, 2012
  22. Hallvard Breien FurusethMay 3, 2012
  23. Rich PixleyMay 3, 2012
  24. Hallvard Breien FurusethMay 3, 2012
  25. Hallvard Breien FurusethMay 3, 2012
  26. Rich PixleyMay 3, 2012
  27. Junio C HamanoMay 3, 2012
  28. Rich PixleyMay 3, 2012
  29. Randal L. SchwartzMay 3, 2012
  30. Junio C HamanoMay 3, 2012
  31. Felipe ContrerasMay 4, 2012
  32. Felipe ContrerasMay 4, 2012
  33. Michael WittenMay 4, 2012
  34. Rich PixleyMay 1, 2012
  35. Randal L. SchwartzMay 1, 2012
  36. Rich PixleyMay 1, 2012
  37. Andreas EricssonMay 1, 2012
  38. PJ WeisbergMay 1, 2012
  39. Rich PixleyMay 3, 2012
  40. Nathan GrayMay 3, 2012
  41. Rich PixleyMay 3, 2012
  42. Randal L. SchwartzMay 3, 2012
  43. Rich PixleyMay 3, 2012
  44. Mark BrownMay 4, 2012
  45. Rich PixleyMay 4, 2012
  46. Jakub NarebskiMay 4, 2012
  47. Mark BrownMay 4, 2012
  48. Hallvard Breien FurusethMay 2, 2012
  49. Michael WittenMay 2, 2012
  50. Hallvard Breien FurusethMay 3, 2012
  51. Randal L. SchwartzMay 3, 2012
  52. Michael WittenMay 3, 2012
  53. Hallvard Breien FurusethMay 3, 2012
  54. Michael WittenMay 3, 2012
  55. Rich PixleyMay 3, 2012
  56. Ted Ts'oMay 3, 2012
  57. Felipe ContrerasMay 1, 2012
  58. Rich PixleyMay 3, 2012
  59. Rich PixleyMay 3, 2012
  60. Andreas EricssonMay 4, 2012
  61. Stephen BashMay 4, 2012
  62. Mark BrownMay 4, 2012
  63. Felipe ContrerasMay 4, 2012
  64. Rich PixleyMay 1, 2012
  65. Jan KrügerApr 30, 2012
  66. Rich PixleyMay 1, 2012
  67. Philippe VaucherMay 2, 2012
  68. Seth RobertsonMay 1, 2012
  69. Rich PixleyMay 1, 2012
  70. Michael WittenMay 1, 2012
  71. Junio C HamanoMay 1, 2012
  72. Michael WittenMay 1, 2012
  73. Rich PixleyMay 1, 2012
  74. Rich PixleyMay 1, 2012
  75. Rich PixleyMay 3, 2012
  76. Ronan KeryellMay 3, 2012
  77. Junio C HamanoMay 3, 2012
  78. Ronan KeryellMay 3, 2012
  79. Rich PixleyMay 3, 2012
  80. Rich PixleyMay 3, 2012
  81. Illia BobyrMay 4, 2012
  82. Nathan GrayMay 4, 2012
  83. Michael WittenMay 4, 2012
  84. Junio C HamanoMay 4, 2012
  85. Carlos Martín NietoMay 4, 2012
  86. Junio C HamanoMay 4, 2012
  87. Junio C HamanoMay 4, 2012
  88. Nathan GrayMay 4, 2012
  89. Illia BobyrMay 4, 2012
  90. Rich PixleyMay 4, 2012
  91. Rich PixleyMay 4, 2012
  92. Michael WittenMay 4, 2012
  93. Andrew SayersMay 4, 2012
  94. Jérôme BenoitMay 4, 2012
  95. Felipe ContrerasMay 4, 2012
  96. Junio C HamanoMay 4, 2012
  97. Felipe ContrerasMay 4, 2012
  98. Rich PixleyMay 4, 2012
  99. Felipe ContrerasMay 4, 2012
  100. Sitaram ChamartyMay 2, 2012

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.