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

Re: [PATCHv4] Documentation: triangular workflow

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2016, 16:47 UTC
Message-ID
<xmqqinxhf0sx.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<E41AB752AE614E189BC5BE289A8AEB2A@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 10 quoted lines
>> +Preparation
>> +~~~~~~~~~~~
>> +
>> +Cloning from **PUBLISH**, which is a fork of **UPSTREAM** or an empty
>> +repository.
>
> I agree here. To clone the upstream, to which you have no push access (by 
> definition), would leave the config badly mis-set for the basic user. It's 
> better for the user to clone their publish fork (to which they have both 
> read and write access).
I do not think I agree.

If you apriori know that you do want to hack on a project's code, then forking at GitHub first and then cloning the copy would be OK.

But I doubt that would be a common set-up, unless you are focusing only on school-like setting where you are told by your instructor to "make changes to this public project, and show the result in your fork". In real life you cannot tell if the project is worth your time modifying until you see it first, can you?

I suspect that the majority of local clones start from something like "I want to build and use from the tip", "I want to use a module that does X, and there are three candidates, so let's clone them all to evaluate", etc. You do not bother "forking at GitHub" but just clone from the upstream for these clones.

After you build it and try things out, you may start making local changes, and you may even record your changes as local commits. You play with your local clone of the upstream. After doing so, you may find that some of the projects do not fit your needs, but for some others, you would find that it is worth your time and effort to upstream your changes and/or keep working further on the project.

And at that point, you would create a publishing place, push into it, and tell others "Hey I did this interesting thing!". That "creat a publishing place" step could be just a one click at GitHub.

Isn't that how you work with other people's projects? Or do you always modify every project you fetch from the outside world?, Do you always fork first, just in case you *might* change and you *might* have to have a place to push your changes out?

If you tell novices "You fork first and then clone your fork", and in the ideal (to you) case they will follow that advice to the letter and they will end up with forks of all projects they will ever look at, in many of which they make no local commit.

What is more likely to happen is that they will first ignore you and start from a local clone of the upstream, and then find this document that says "triangular workflow requires you to fork first, clone that fork and work in it". Because they would have to fork first and make another clone, this time a clone of the fork, in order to follow the instruction of this document, they oblige, ending up with two clones. More importantly, this makes the local clone of the upstream they made earlier and the changes they made in that clone appear useless. They need to be told how to transplant the work done in the clone to the newly created clone of the fork, in order to publish them.

If your instruction begins with "You clone from upstream as usual (i.e. just like when you make a "read-only" clone without any intention to make changes or push changes out), and add a publish place if/when it becomes necessary", the problem described in the previous paragraph goes away, no?

Previous: Philip OakleyNext: Philip Oakley
Message 38 of 41 in “[RFC] Triangular Workflow: user friendly full implementation”
  1. Jordan DE GEAMay 26, 2016
  2. Matthieu MoyMay 26, 2016
  3. Junio C HamanoMay 26, 2016
  4. [RFC] Triangular Workflow UI improvementJordan DE GEA, May 30, 2016
  5. Philip OakleyMay 27, 2016
  6. [RFC] Triangular Workflow UI improvmentsJordan DE GEA, May 30, 2016
  7. Triangular Workflow UI improvement: DocumentationJordan DE GEA, May 31, 2016
  8. Matthieu MoyMay 31, 2016
  9. Jordan DE GEAJun 1, 2016
  10. Michael HaggertyJun 2, 2016
  11. Philip OakleyJun 3, 2016
  12. Jordan DE GEAJun 3, 2016
  13. Matthieu MoyJun 3, 2016
  14. Jordan DE GEAJun 3, 2016
  15. Jordan DE GEAJun 5, 2016
  16. Matthieu MoyJun 6, 2016
  17. Philip OakleyJun 6, 2016
  18. Matthieu MoyJun 6, 2016
  19. Philip OakleyJun 6, 2016
  20. Matthieu MoyJun 7, 2016
  21. Philip OakleyJun 7, 2016
  22. Junio C HamanoJun 3, 2016
  23. Philip OakleyJun 3, 2016
  24. [RFC/PATCHv2] Documentation: triangular workflowJordan DE GEA, Jun 6, 2016
  25. Junio C HamanoJun 6, 2016
  26. Philip OakleyJun 6, 2016
  27. Matthieu MoyJun 7, 2016
  28. Jordan DE GEAJun 7, 2016
  29. [PATCHv3] Documentation: triangular workflowJordan DE GEA, Jun 7, 2016
  30. Junio C HamanoJun 7, 2016
  31. Jordan DE GEAJun 8, 2016
  32. Matthieu MoyJun 8, 2016
  33. [PATCHv4] Documentation: triangular workflowJordan DE GEA, Jun 9, 2016
  34. Junio C HamanoJun 9, 2016
  35. Ramkumar RamachandraJun 11, 2016
  36. Philip OakleyJun 11, 2016
  37. Philip OakleyJun 9, 2016
  38. Junio C HamanoJun 10, 2016
  39. Philip OakleyJun 11, 2016
  40. Junio C HamanoJun 13, 2016
  41. [RFC] Triangular Workflow UI improvementJordan DE GEA, May 30, 2016

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.