git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Philip Oakley" <philipoakley@iee.org>
Cc: "Jordan DE GEA" <jordan.de-gea@grenoble-inp.org>,
	<mhagger@alum.mit.edu>, <git@vger.kernel.org>,
	<erwan.mathoniere@grenoble-inp.org>,
	<samuel.groot@grenoble-inp.org>, <tom.russello@grenoble-inp.org>,
	<Matthieu.Moy@grenoble-inp.fr>, <peff@peff.net>,
	<artagnon@gmail.com>
Subject: Re: [PATCHv4] Documentation: triangular workflow
Date: Fri, 10 Jun 2016 09:47:42 -0700	[thread overview]
Message-ID: <xmqqinxhf0sx.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <E41AB752AE614E189BC5BE289A8AEB2A@PhilipOakley> (Philip Oakley's message of "Thu, 9 Jun 2016 19:19:20 +0100")

"Philip Oakley" <philipoakley@iee.org> writes:

>> +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?

  reply	other threads:[~2016-06-10 16:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 10:06 [RFC] Triangular Workflow: user friendly full implementation Jordan DE GEA
2016-05-26 11:04 ` Matthieu Moy
2016-05-26 18:30 ` Junio C Hamano
2016-05-30  8:46   ` [RFC] Triangular Workflow UI improvement Jordan DE GEA
2016-05-27  7:32 ` [RFC] Triangular Workflow: user friendly full implementation Philip Oakley
2016-05-30  9:07   ` [RFC] Triangular Workflow UI improvments Jordan DE GEA
2016-05-31 12:28     ` [RFC/PATCH] Triangular Workflow UI improvement: Documentation Jordan DE GEA
2016-05-31 14:33       ` Matthieu Moy
2016-06-01  9:32         ` Jordan DE GEA
2016-06-02 12:02         ` Michael Haggerty
2016-06-03  7:25       ` Philip Oakley
2016-06-03  9:52         ` Jordan DE GEA
2016-06-03 11:36           ` Matthieu Moy
2016-06-03 11:53             ` Jordan DE GEA
2016-06-05 21:28             ` Jordan DE GEA
2016-06-06  7:58               ` Matthieu Moy
2016-06-06 16:46                 ` Philip Oakley
2016-06-06 16:54                   ` Matthieu Moy
2016-06-06 19:21                     ` Philip Oakley
2016-06-07  7:03                       ` Matthieu Moy
2016-06-07 20:08                         ` Philip Oakley
2016-06-03 15:46         ` Junio C Hamano
2016-06-03 22:16           ` Philip Oakley
2016-06-06  9:48       ` [RFC/PATCHv2] Documentation: triangular workflow Jordan DE GEA
2016-06-06 19:23         ` Junio C Hamano
2016-06-06 22:21           ` Philip Oakley
2016-06-07  6:58             ` Matthieu Moy
2016-06-07  8:02               ` Jordan DE GEA
2016-06-07  8:38         ` [PATCHv3] " Jordan DE GEA
2016-06-07 19:12           ` Junio C Hamano
2016-06-08  8:37             ` Jordan DE GEA
2016-06-08 13:20             ` Matthieu Moy
2016-06-09 12:35           ` [PATCHv4] " Jordan DE GEA
2016-06-09 17:02             ` Junio C Hamano
2016-06-11 15:58               ` Ramkumar Ramachandra
2016-06-11 19:31                 ` Philip Oakley
2016-06-09 18:19             ` Philip Oakley
2016-06-10 16:47               ` Junio C Hamano [this message]
2016-06-11 19:25                 ` Philip Oakley
2016-06-13 18:35                   ` Junio C Hamano
2016-05-30  8:39 ` [RFC] Triangular Workflow UI improvement Jordan DE GEA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqinxhf0sx.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=artagnon@gmail.com \
    --cc=erwan.mathoniere@grenoble-inp.org \
    --cc=git@vger.kernel.org \
    --cc=jordan.de-gea@grenoble-inp.org \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    --cc=samuel.groot@grenoble-inp.org \
    --cc=tom.russello@grenoble-inp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).