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

Re: [PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2013, 22:09 UTC
Message-ID
<7vmwvbstw1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1e3996dff5c19010aca1458b202b14cbb54b5d80.1360508415.git.wking@tremily.us>
"W. Trevor King" <wking@tremily.us> writes:
Show 22 quoted lines
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index a68d6b9..424cdd6 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -2909,8 +2909,23 @@ Also note that all of the above configuration can be performed by
>  directly editing the file .git/config instead of using
>  linkgit:git-config[1].
>  
> +You can produce a similar configuration with:
> +
> +-------------------------------------------------
> +$ git remote add example git://example.com/proj.git
> +-------------------------------------------------
> +
> +which adds the following stanza to `.git/config`:
> +
> +-------------------------------------------------
> +[remote "example"]
> +        url = git://example.com/proj.git
> +        fetch = +refs/heads/*:refs/remotes/example/*
> +-------------------------------------------------
> +

What the "config remoteexample.fetch" example before this hunk teaches is stale and is a wrong advice these days. I suspect that the original was written very soon after a separate refs/remotes/ hierarchy was introduced, back when it was considered a good and cautious practice to notice rewinds at the remote by omitting the "+" from fetch refspecs. I'd suggest rewriting everything after "If there are other repositories that you also use frequently,..." of this section.

Replace the first example after "for example, after" that uses "config remote.example.url" with the new text in your patch, and remove everything before "Also note that all of the above configuration can be performed by directly editing", while keeping examples of what various forms of "git fetch" would do with the above configuration file, without mentioning what would happen if you omitted "+" from them.

Previous: Junio C HamanoNext: W. Trevor King
Message 74 of 97 in “user-manual: Rewrite git-gc section for automatic packing”
  1. user-manual: Rewrite git-gc section for automatic packingW. Trevor King, Feb 8, 2013
  2. Junio C HamanoFeb 8, 2013
  3. W. Trevor KingFeb 8, 2013
  4. Junio C HamanoFeb 8, 2013
  5. Junio C HamanoFeb 8, 2013
  6. 00/15 User manual updatesW. Trevor King, Feb 10, 2013
  7. 01/15 user-manual: Rewrite git-gc section for automatic packingW. Trevor King, Feb 10, 2013
  8. 02/15 user-manual: Update for receive.denyCurrentBranch=refuseW. Trevor King, Feb 10, 2013
  9. Junio C HamanoFeb 10, 2013
  10. W. Trevor KingFeb 10, 2013
  11. Junio C HamanoFeb 10, 2013
  12. Junio C HamanoFeb 14, 2013
  13. W. Trevor KingFeb 17, 2013
  14. 0/9 User manual updatesW. Trevor King, Feb 18, 2013
  15. 1/9 user-manual: Use 'remote add' to setup push URLsW. Trevor King, Feb 18, 2013
  16. Junio C HamanoFeb 18, 2013
  17. Jonathan NiederFeb 18, 2013
  18. 2/9 user-manual: Reorganize the reroll sections, adding 'git rebase -i'W. Trevor King, Feb 18, 2013
  19. Junio C HamanoFeb 18, 2013
  20. W. Trevor KingFeb 18, 2013
  21. Junio C HamanoFeb 18, 2013
  22. 3/9 user-manual: Give 'git push -f' as an alternative to +masterW. Trevor King, Feb 18, 2013
  23. Junio C HamanoFeb 18, 2013
  24. 4/9 user-manual: Mention 'git remote add' for remote branch configW. Trevor King, Feb 18, 2013
  25. Junio C HamanoFeb 18, 2013
  26. W. Trevor KingFeb 18, 2013
  27. 5/9 user-manual: Standardize backtick quotingW. Trevor King, Feb 18, 2013
  28. user-manual: Standardize backtick quotingW. Trevor King, Feb 25, 2013
  29. 6/9 user-manual: Use 'git config --global user.*' for setupW. Trevor King, Feb 18, 2013
  30. Junio C HamanoFeb 18, 2013
  31. W. Trevor KingFeb 18, 2013
  32. 7/9 user-manual: Use request-pull to generate "please pull" textW. Trevor King, Feb 18, 2013
  33. Junio C HamanoFeb 18, 2013
  34. 8/9 user-manual: Flesh out uncommitted changes and submodule updatesW. Trevor King, Feb 18, 2013
  35. Junio C HamanoFeb 18, 2013
  36. W. Trevor KingFeb 19, 2013
  37. 9/9 user-manual: Use -o latest.tar.gz to create a gzipped tarballW. Trevor King, Feb 18, 2013
  38. Junio C HamanoFeb 18, 2013
  39. W. Trevor KingFeb 18, 2013
  40. Junio C HamanoFeb 18, 2013
  41. W. Trevor KingFeb 18, 2013
  42. W. Trevor KingFeb 19, 2013
  43. 0/3 User manual updatesW. Trevor King, Feb 19, 2013
  44. 1/3 user-manual: Reorganize the reroll sections, adding 'git rebase -i'W. Trevor King, Feb 19, 2013
  45. Junio C HamanoFeb 19, 2013
  46. W. Trevor KingFeb 19, 2013
  47. Junio C HamanoFeb 19, 2013
  48. user-manual: Fix the interactive rebase example commit rangeW. Trevor King, Mar 24, 2013
  49. Eric SunshineMar 24, 2013
  50. W. Trevor KingMar 24, 2013
  51. 2/3 user-manual: Use request-pull to generate "please pull" textW. Trevor King, Feb 19, 2013
  52. 3/3 user-manual: Flesh out uncommitted changes and submodule updatesW. Trevor King, Feb 19, 2013
  53. Drew NorthupFeb 18, 2013
  54. Junio C HamanoFeb 18, 2013
  55. 03/15 user-manual: Use 'remote add' to setup push URLsW. Trevor King, Feb 10, 2013
  56. Junio C HamanoFeb 10, 2013
  57. W. Trevor KingFeb 10, 2013
  58. Jonathan NiederFeb 10, 2013
  59. W. Trevor KingFeb 10, 2013
  60. Junio C HamanoFeb 10, 2013
  61. W. Trevor KingFeb 10, 2013
  62. 04/15 user-manual: Use git branch --mergedW. Trevor King, Feb 10, 2013
  63. Junio C HamanoFeb 10, 2013
  64. W. Trevor KingFeb 10, 2013
  65. 05/15 user-manual: Add a few references to 'git rebase -i'W. Trevor King, Feb 10, 2013
  66. Junio C HamanoFeb 10, 2013
  67. W. Trevor KingFeb 10, 2013
  68. 06/15 user-manual: Give 'git push -f' as an alternative to +masterW. Trevor King, Feb 10, 2013
  69. Junio C HamanoFeb 10, 2013
  70. W. Trevor KingFeb 10, 2013
  71. Junio C HamanoFeb 10, 2013
  72. 07/15 user-manual: Mention 'git remote add' for remote branch configW. Trevor King, Feb 10, 2013
  73. Junio C HamanoFeb 10, 2013
  74. Junio C HamanoFeb 10, 2013
  75. W. Trevor KingFeb 10, 2013
  76. 08/15 user-manual: Standardize backtick quotingW. Trevor King, Feb 10, 2013
  77. W. Trevor KingFeb 10, 2013
  78. 09/15 user-manual: Use 'git config --global user.*' for setupW. Trevor King, Feb 10, 2013
  79. Junio C HamanoFeb 10, 2013
  80. W. Trevor KingFeb 10, 2013
  81. Junio C HamanoFeb 10, 2013
  82. W. Trevor KingFeb 10, 2013
  83. 10/15 user-manual: Fix 'both: so' -> 'both; so' typoW. Trevor King, Feb 10, 2013
  84. 11/15 user-manual: Fix 'http' -> 'HTTP' typosW. Trevor King, Feb 10, 2013
  85. 12/15 user-manual: Use request-pull to generate "please pull" textW. Trevor King, Feb 10, 2013
  86. Junio C HamanoFeb 10, 2013
  87. W. Trevor KingFeb 10, 2013
  88. 13/15 user-manual: Fix 'you - Git' -> 'you--Git' typoW. Trevor King, Feb 10, 2013
  89. 14/15 user-manual: Flesh out uncommitted changes and submodule updatesW. Trevor King, Feb 10, 2013
  90. 15/15 user-manual: Use --format=tar.gz to create a gzipped tarballW. Trevor King, Feb 10, 2013
  91. Junio C HamanoFeb 10, 2013
  92. W. Trevor KingFeb 10, 2013
  93. Junio C HamanoFeb 10, 2013
  94. W. Trevor KingFeb 10, 2013
  95. Junio C HamanoFeb 10, 2013
  96. W. Trevor KingFeb 10, 2013
  97. Javier TiaFeb 9, 2013

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.