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

Re: Re: [PATCH/RFC] builtin-checkout: suggest creating local branch when appropriate to do so

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 12, 2009, 07:49 UTC
Message-ID
<alpine.DEB.1.00.0910120941150.4985@pacific.mpi-cbg.de>
In-Reply-To
<0016e68fd0123a175304754694b4@google.com>
Hi,
On Tue, 6 Oct 2009, Euguess@gmail.com wrote:
> I'ma new user of git and I don't think i will ever have a commit in 
> git.git, because I'm not a programmer (I'm QA).
Welcome!

Let me take this opportunity to express my deep sadness that your first input to this list was brushed off so carelessly.

I sincerely hope that you give us another chance, and that you let us benefit from your fresh and unbiased view of the usability issues in Git (some of us use Git for so long, they think that Git has no usability issues anymore).

Show 11 quoted lines
> I was reading this topic as carefully as i could and I think that this 
> makes a lot of sense to address this issue. As i understand when 
> somebody fetches from remote repo in order to be able to start working 
> on the code from this remote repo you should create tracking branch for 
> one of the branches from remote and only then you should do your changes 
> or perform merges.
>
> in case if you didn't do that and you try to checkout you will end up 
> having detached HEAD which is quite scary;) for non-experienced user and 
> as i see might lead to some unnecessary questions in this list or on IRC 
> channel...

Right. We see that type of confusion in #git everyday, and blaming the user would be a violation of http://c2.com/cgi/wiki?BlameTheRightThing

Show 21 quoted lines
> As for the solution i would choose the "simplest thing that will work" - 
> so i think that we just have to notify user about his suicide attempt to 
> checkout nonlocal branch and offer him a correct syntax to go with.
>
> Something like below should work:
> 
> % git clone git://git.git git
> % git checkout next
> You're attempting to checkout to non-local branch. This will lead to your HEAD
> being detached (our team is on its way!).
> Do you want to check out local branch 'next' tracking 'origin/next' instead?
> y/n
> 
> if yes, then:
> Created branch "next" tracking "origin/next"
> You can update it with 'git pull'.
> 
> If no - abort or continue with checkout to nonlocal branch? ('m not sure if
> detaching HEAD can provide some benefits if done on purpose)
> 
> I hope I'm not missing anything...

No, I think that is something perfectly fine to expect in a software whose UI complexity is unfortunately pretty much in disagreement with its internal complexity.

One thing one might add for the technically inclined folks (i.e. those who need to implement, and to see that Git is in dear need of some user-friendliness first): "git checkout" is a porcelain (i.e. a program meant for end-user consumption), and as such should not have a problem to react to isatty(0) (i.e. "is the input coming directly from the console?").

So yes, even if I was on the verge of giving up on this thread, I have been encouraged enough to get this uphill battle going again, and to try to overturn some stubborn resistance.

Ciao, Dscho

Previous: Junio C HamanoNext: Björn Steinbrink
Message 58 of 91 in “builtin-checkout: suggest creating local branch when appropriate to do so”
  1. builtin-checkout: suggest creating local branch when appropriate to do soJay Soffian, Oct 5, 2009
  2. Sverre RabbelierOct 5, 2009
  3. Johannes SchindelinOct 5, 2009
  4. Sverre RabbelierOct 5, 2009
  5. Jay SoffianOct 5, 2009
  6. Jay SoffianOct 5, 2009
  7. Johannes SchindelinOct 5, 2009
  8. Jeff KingOct 5, 2009
  9. Thomas RastOct 6, 2009
  10. Johannes SchindelinOct 6, 2009
  11. Junio C HamanoOct 6, 2009
  12. Johannes SchindelinOct 6, 2009
  13. Junio C HamanoOct 6, 2009
  14. Johannes SchindelinOct 6, 2009
  15. Matthieu MoyOct 6, 2009
  16. Mikael MagnussonOct 6, 2009
  17. Johannes SchindelinOct 6, 2009
  18. Junio C HamanoOct 18, 2009
  19. 1/3 check_filename(): make verify_filename() callable without dyingJunio C Hamano, Oct 18, 2009
  20. 2/3 DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"Junio C Hamano, Oct 18, 2009
  21. Nanako ShiraishiOct 18, 2009
  22. Björn SteinbrinkOct 18, 2009
  23. Nanako ShiraishiOct 18, 2009
  24. Junio C HamanoOct 18, 2009
  25. Björn SteinbrinkOct 19, 2009
  26. 3/3 git checkout --nodwimJunio C Hamano, Oct 18, 2009
  27. Alex RiesenOct 18, 2009
  28. Junio C HamanoOct 18, 2009
  29. Use "--no-" prefix to switch off some of checkout dwimmeryAlex Riesen, Oct 18, 2009
  30. Junio C HamanoOct 18, 2009
  31. Alex RiesenOct 19, 2009
  32. Alex RiesenOct 19, 2009
  33. Junio C HamanoOct 19, 2009
  34. Alex RiesenOct 19, 2009
  35. Junio C HamanoOct 19, 2009
  36. Avery PennarunOct 21, 2009
  37. Nanako ShiraishiOct 21, 2009
  38. Junio C HamanoOct 21, 2009
  39. git checkout --no-guessJunio C Hamano, Oct 21, 2009
  40. Avery PennarunOct 21, 2009
  41. Jay SoffianOct 26, 2009
  42. Avery PennarunOct 26, 2009
  43. Johannes SchindelinOct 22, 2009
  44. Erik Faye-LundOct 22, 2009
  45. Michael J GruberOct 23, 2009
  46. Junio C HamanoOct 24, 2009
  47. David RoundyOct 24, 2009
  48. Junio C HamanoOct 24, 2009
  49. Johannes SchindelinOct 26, 2009
  50. Avery PennarunOct 26, 2009
  51. Jeff KingOct 26, 2009
  52. Avery PennarunOct 26, 2009
  53. Jeff KingOct 26, 2009
  54. Avery PennarunOct 26, 2009
  55. Jeff KingOct 5, 2009
  56. Eugene SajineOct 6, 2009
  57. Junio C HamanoOct 6, 2009
  58. Johannes SchindelinOct 12, 2009
  59. Björn SteinbrinkOct 12, 2009
  60. Thomas RastOct 12, 2009
  61. Junio C HamanoOct 12, 2009
  62. Thomas RastOct 13, 2009
  63. Junio C HamanoOct 13, 2009
  64. Junio C HamanoOct 13, 2009
  65. Thomas RastOct 13, 2009
  66. Junio C HamanoOct 13, 2009
  67. Johannes SchindelinOct 13, 2009
  68. Junio C HamanoOct 13, 2009
  69. Jeff KingOct 13, 2009
  70. Johannes SchindelinOct 13, 2009
  71. Jay SoffianOct 14, 2009
  72. Junio C HamanoOct 14, 2009
  73. Jay SoffianOct 14, 2009
  74. Junio C HamanoOct 14, 2009
  75. Uri OkrentOct 25, 2009
  76. Jeff KingOct 14, 2009
  77. Thomas RastOct 14, 2009
  78. Jakub NarebskiOct 14, 2009
  79. Johannes SixtOct 13, 2009
  80. Daniel BarkalowOct 13, 2009
  81. Junio C HamanoOct 13, 2009
  82. Daniel BarkalowOct 13, 2009
  83. Jeff KingOct 13, 2009
  84. Junio C HamanoOct 13, 2009
  85. Johannes SchindelinOct 13, 2009
  86. Thomas RastOct 14, 2009
  87. Johannes SchindelinOct 16, 2009
  88. Thomas RastOct 16, 2009
  89. Uri OkrentOct 25, 2009
  90. Junio C HamanoOct 26, 2009
  91. Björn SteinbrinkOct 13, 2009

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.