From: Linus Torvalds <torvalds@osdl.org>
To: Jerome Lovy <t2a2e9z8ncbs9qg@brefemail.com>
Cc: git@vger.kernel.org
Subject: Re: Rationale for the "Never commit to the right side of a Pull line" rule
Date: Thu, 26 Oct 2006 10:11:50 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610261003590.3962@g5.osdl.org> (raw)
In-Reply-To: <ehqp1u$j4$1@sea.gmane.org>
On Thu, 26 Oct 2006, Jerome Lovy wrote:
>
> Could someone please point me to / give me the rationale for the "Never commit
> to the right side of a Pull line" rule ?
It's not a technical rule per se.
It's just a way to avoid what will almost inevitably otherwise be a
horribly horribly confusing situation.
I say "almost inevitably", because if you really have worked with git
enough, and understand how it works on a very fundamental level, there are
actually no problems at all with doing so, and maybe you could have
perfectly fine reasons to break the rule, and commit to a branch that is
officially "maintained in another repository" and then push it out.
But it's a good rule in general, just because it makes a certain common
workflow explicit. In fact, we really probably should start to always use
the "refs/remote/origin/HEAD" kind of syntax by default, where you can't
even _switch_ to the branch maintained in the remote repository, because
it's not a real branch locally.
So normally you should consider the "origin" branch to be a pointer to
WHAT YOU FETCHED LAST - and that implies that you shouldn't commit to it,
because then it loses that meaning (now it's "what you fetched last and
then committed your own work on top of", which is something totally
different).
next prev parent reply other threads:[~2006-10-26 17:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 16:47 Rationale for the "Never commit to the right side of a Pull line" rule Jerome Lovy
2006-10-26 17:11 ` Linus Torvalds [this message]
2006-10-26 17:26 ` Karl Hasselström
2006-10-26 17:30 ` Jakub Narebski
2006-10-27 8:56 ` Luben Tuikov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0610261003590.3962@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=t2a2e9z8ncbs9qg@brefemail.com \
/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.
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 NNTP newsgroup(s).