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

Re: [RFC PATCH] push: start warning upcoming default change for push.default

From
HHHolger Hellmuth <hellmuth@ira.uka.de>
Date
Mar 15, 2012, 10:43 UTC
Message-ID
<4F61C7C9.8020705@ira.uka.de>
In-Reply-To
<vpqehsumgvd.fsf@bauges.imag.fr>
On 15.03.2012 09:02, Matthieu Moy wrote:
Show 13 quoted lines
> Holger Hellmuth<hellmuth@ira.uka.de>  writes:
>
>> So today I tried to create a
>> bidirectional link between a local and a remote branch using only
>> porcelain commands (i.e. without using git config directly). Somehow I
>> didn't succeed. I can either use git checkout --track or git push -u
>> to make a pull connection between the two, but to automatically push I
>> would have to create a branch of the same name (and know that this is
>> the magical ingredient that makes it work!)
>
> In this particular case, having 'push.default=upstream' would have done
> it for you: your "push -u" would have set up the upstream, and the next
> "push" would have followed it.

I know, this is why I voted for "upstream", but there are good reasons for "current" too. Whatever is decided on will still get some users by surprise.

> (or you could "git push remote local-branch:remote-branch")
>

Sure, I can believe that a new user will be able to get at that line after studying the "git push" manual page (or reading a tutorial), but I really doubt he will easily find out where to go from there to simplify that line. And typing that line every time for a permanent connection is out of the question, right?

That is why I think git push --track remote local-branch:remote-branch (or --permanent, --perm, --follow, --configure, --keep) would be a great help because a tutorial wouldn't have to talk about a lot of special cases, config options, it could just explain:

-----------------------------
1) To follow a remote repository do "git remote add <repo> <url>
2) To follow a remote branch do "git checkout [-b localbranch] --track 
<repo>/<branch>. Then "git pull" while in this branch will synchronize 
you whenever you want to be up-to-date.
3) To get a remote branch to follow you do "git push --track <repo> 
<local-branch>:<branch> once. Then "git push" while in this branch will 
synchronize the remote branch.
-----------------------------

With this simple recipe 90% of all workflows could be configured by a novice without embarrasing himself. Can you find a similar simple and consise recipe that would work today (even with upstream or current) ? I doubt it.

Sorry about opening up another tangent, but this is somewhat connected. If we give the novice an easy instrument to configure what he really wants then the default becomes much less important.

Previous: Matthieu MoyNext: Andreas Ericsson
Message 68 of 116 in “git push default behaviour?”
  1. Jeremy MortonMar 8, 2012
  2. Thomas RastMar 8, 2012
  3. Jeremy MortonMar 8, 2012
  4. Carlos Martín NietoMar 8, 2012
  5. Jeremy MortonMar 8, 2012
  6. Carlos Martín NietoMar 8, 2012
  7. Jeremy MortonMar 8, 2012
  8. Junio C HamanoMar 8, 2012
  9. Matthieu MoyMar 8, 2012
  10. Andreas KreyMar 8, 2012
  11. Junio C HamanoMar 8, 2012
  12. Matthieu MoyMar 9, 2012
  13. Junio C HamanoMar 9, 2012
  14. Jeremy MortonMar 9, 2012
  15. Matthieu MoyMar 9, 2012
  16. Jakub NarebskiMar 9, 2012
  17. Miles BaderMar 19, 2012
  18. Philippe VaucherMar 19, 2012
  19. Marc BranchaudMar 8, 2012
  20. Matthieu MoyMar 8, 2012
  21. Dmitry PotapovMar 8, 2012
  22. Matthieu MoyMar 8, 2012
  23. Jeff KingMar 9, 2012
  24. Junio C HamanoMar 9, 2012
  25. Junio C HamanoMar 9, 2012
  26. demerphqMar 9, 2012
  27. Thomas RastMar 9, 2012
  28. Junio C HamanoMar 9, 2012
  29. Gelonida NMar 16, 2012
  30. Matthieu MoyMar 9, 2012
  31. push: start warning upcoming default change for push.defaultMatthieu Moy, Mar 9, 2012
  32. Junio C HamanoMar 9, 2012
  33. Junio C HamanoMar 9, 2012
  34. Carlos Martín NietoMar 9, 2012
  35. Marc BranchaudMar 9, 2012
  36. Stefan HallerMar 9, 2012
  37. Junio C HamanoMar 10, 2012
  38. Stefan HallerMar 11, 2012
  39. Matthieu MoyMar 12, 2012
  40. Stefan HallerMar 12, 2012
  41. Matthieu MoyMar 12, 2012
  42. Junio C HamanoMar 12, 2012
  43. Marc BranchaudMar 12, 2012
  44. Michael HaggertyMar 10, 2012
  45. Marc BranchaudMar 12, 2012
  46. Matthieu MoyMar 12, 2012
  47. Junio C HamanoMar 12, 2012
  48. Jeff KingMar 12, 2012
  49. Junio C HamanoMar 12, 2012
  50. Junio C HamanoMar 12, 2012
  51. Marc BranchaudMar 12, 2012
  52. Matthieu MoyMar 13, 2012
  53. Matthieu MoyMar 13, 2012
  54. Jeff KingMar 13, 2012
  55. Junio C HamanoMar 13, 2012
  56. Jeff KingMar 14, 2012
  57. Junio C HamanoMar 14, 2012
  58. Matthieu MoyMar 13, 2012
  59. Junio C HamanoMar 13, 2012
  60. Matthieu MoyMar 13, 2012
  61. Stefan HallerMar 13, 2012
  62. Matthieu MoyMar 14, 2012
  63. Marc BranchaudMar 13, 2012
  64. Holger HellmuthMar 13, 2012
  65. Junio C HamanoMar 13, 2012
  66. Holger HellmuthMar 14, 2012
  67. Matthieu MoyMar 15, 2012
  68. Holger HellmuthMar 15, 2012
  69. Andreas EricssonMar 13, 2012
  70. Jeff KingMar 13, 2012
  71. Dmitry PotapovMar 13, 2012
  72. Junio C HamanoMar 14, 2012
  73. Dmitry PotapovMar 14, 2012
  74. Junio C HamanoMar 14, 2012
  75. Dmitry PotapovMar 14, 2012
  76. Junio C HamanoMar 14, 2012
  77. Matthieu MoyMar 14, 2012
  78. Dmitry PotapovMar 14, 2012
  79. Matthieu MoyMar 14, 2012
  80. Dmitry PotapovMar 14, 2012
  81. Matthieu MoyMar 15, 2012
  82. Michael HaggertyMar 14, 2012
  83. Jeff KingMar 14, 2012
  84. Ævar Arnfjörð BjarmasonMar 9, 2012
  85. Clemens BuchacherMar 16, 2012
  86. Matthieu MoyMar 16, 2012
  87. Junio C HamanoMar 16, 2012
  88. Matthieu MoyMar 16, 2012
  89. Clemens BuchacherMar 16, 2012
  90. Matthieu MoyMar 17, 2012
  91. Andrew MyersMar 19, 2012
  92. Junio C HamanoMar 9, 2012
  93. Matthieu MoyMar 9, 2012
  94. Junio C HamanoMar 9, 2012
  95. Junio C HamanoMar 9, 2012
  96. Jakub NarebskiMar 9, 2012
  97. Junio C HamanoMar 9, 2012
  98. Jakub NarebskiMar 13, 2012
  99. Matthieu MoyMar 12, 2012
  100. Junio C HamanoMar 12, 2012
  101. Matthieu MoyMar 13, 2012
  102. Junio C HamanoMar 13, 2012
  103. Junio C HamanoMar 16, 2012
  104. Eric HanchrowMar 17, 2012
  105. Dmitry PotapovMar 8, 2012
  106. Jakub NarebskiMar 8, 2012
  107. Jeremy MortonMar 8, 2012
  108. Jakub NarebskiMar 13, 2012
  109. Jeremy MortonMar 14, 2012
  110. Jakub NarebskiMar 14, 2012
  111. Matthieu MoyMar 8, 2012
  112. demerphqMar 8, 2012
  113. Sebastien DoucheMar 17, 2012
  114. Jeremy MortonMar 17, 2012
  115. Sebastien DoucheMar 17, 2012
  116. Pavel PospíšilMar 18, 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.