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

Re: [PATCH v2 1/1] gitfaq: append the 'Common Issues' section

From
Shourya Shukla <shouryashukla.oo@gmail.com>
Date
Apr 21, 2020, 08:38 UTC
Message-ID
<20200421083820.GB11800@konoha>
In-Reply-To
<xmqqsggxpseq.fsf@gitster.c.googlers.com>
On 20/04 05:57, Junio C Hamano wrote:
> Shourya Shukla <shouryashukla.oo@gmail.com> writes:
Show 11 quoted lines
> >+ 		2. One might want to have two different remotes for
> >+ 		fetching and pushing; this generally happens in case
> >+ 		of triangular workflows.  In this case, it is
> >+ 		advisable to create a separate remote just for
> >+ 		fetching/pushing.
> 
> Yes, by definition, triangular is about fetching from somebody else
> and publishing to your own place for others to fetch, so you'd need
> two remotes, as you are not talking with a single repository.
> 
> But I find your phrasing quite confusing.

I understand. My words turn out to be very ambiguous sometimes. I meant creating a separate remote for fetch and separate one for push. Apologies for the confusion.

Show 25 quoted lines
> "advisable to have two remotes, one for fetching and the other for
> pushing" would probably be a lot more correct.
> 
> And I can understand why you did not write so, and instead ended up
> with your version.  In order to reach the goal of having two (one
> for push and one for fetch), you would "create a separate remote" as
> you are likely to already have one for one direction (in other
> words, you didn't want to say "advisable to create two remotes").
> 
> You wrote "create a separate remote just for fetching/pushing" and
> made the direction of the new one vague, because you do not know if
> that existing one is for fetching or pushing,
> 
> But I suspect that all of the above would not be as clear to those
> who need their questions answered as to somebody like me who knows
> what you want to say already.  And you do not want to explain things
> in a way that only is understood by experts.  How about rephrasing
> the above more like so?
> 
> 	2. One may want to fetch from one repository and push to
> 	anther repository---this is often called a "triangular"
> 	workflow.  As you'd probably have one remote that you use
> 	for fetching already created when you cloned the project,
> 	you would want to create a separate remote to record the URL
> 	you push to.
Yep. I will add this. This reads out much better.
Show 7 quoted lines
> >+ But, another way can be to change
> >+ 		the push url using the `--push` option in the `git
> >+ 		set-url` command.
> 
> Do not recommend this when you describe a triangular workflow; it is
> confusing to readers.  Keeping separate fetch and push URLs for a
> single remote is not triangular.  

I thought it would be OK to describe a maybe *unorthodox* way to do this. I will remove it in the next version.

Show 7 quoted lines
> Describe it separately as a different use case, e.g.
> 
> 	3. You may want to push to a repository over a network
> 	protocol different from the one you use to fetch from the
> 	repository.  Perhaps you want unauthenticated https:// URL
> 	for fetching from, and use ssh:// URL when you push to, the
> 	same remote.  In such a case, ...

That sounds quite better. I will incorporate this. Thank you so much for such a detailed review! :)

Regards, Shourya Shukla

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 10 in “update gitfaq”
  1. 0/1 update gitfaqShourya Shukla, Apr 13, 2020
  2. 1/1 gitfaq: append the 'Common Issues' sectionShourya Shukla, Apr 13, 2020
  3. brian m. carlsonApr 14, 2020
  4. Junio C HamanoApr 14, 2020
  5. Junio C HamanoApr 16, 2020
  6. Shourya ShuklaApr 21, 2020
  7. Junio C HamanoApr 16, 2020
  8. Junio C HamanoApr 21, 2020
  9. Shourya ShuklaApr 21, 2020
  10. Junio C HamanoApr 21, 2020

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.