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

Re: Rationale for the "Never commit to the right side of a Pull line" rule

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Oct 27, 2006, 08:56 UTC
Message-ID
<546144.34624.qm@web31811.mail.mud.yahoo.com>
In-Reply-To
<ehqp1u$j4$1@sea.gmane.org>
--- Jerome Lovy <t2a2e9z8ncbs9qg@brefemail.com> wrote:
Show 13 quoted lines
> Hi,
> 
> Could someone please point me to / give me the rationale for the "Never 
> commit to the right side of a Pull line" rule ?
> 
> I found the rule in the second Note of the git-fetch man-page (eg 
> http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).
> 
> It's been taken over in _bold letters_ by X.Org/freedesktop.org in their 
> "UsingGit" document (http://freedesktop.org/wiki/UsingGit).
> 
> In both places though, I don't see any explanation, but rather a 
> commandment ;-) . Am I missing the ovious ?

Yes, you are missing the obvious and yes it is explained. Read the 2nd "Note" for the documentation of "git-fetch":

http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html
Quoted here for convenience:

[NOTE] You never do your own development on branches that appear on the right hand side of a <refspec> colon on `Pull:` lines; they are to be updated by `git-fetch`. If you intend to do development derived from a remote branch `B`, have a `Pull:` line to track it (i.e. `Pull: B:remote-B`), and have a separate branch `my-B` to do your development on top of it. The latter is created by `git branch my-B remote-B` (or its equivalent `git checkout -b my-B remote-B`). Run `git fetch` to keep track of the progress of the remote side, and when you see something new on the remote branch, merge it into your development branch with `git pull . remote-B`, while you are on `my-B` branch. The common `Pull: master:origin` mapping of a remote `master` branch to a local `origin` branch, which is then merged to a local development branch, again typically named `master`, is made when you run `git clone` for you to follow this pattern.

  Luben
Show 13 quoted lines
> 
> My candid thoughts: to me the practice recommended here seems 
> subjectively "cleaner" indeed, but is it objectively better or even 
> essential? Why?
> 
> TIA
> Jérôme
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Previous: Jakub Narebski
Message 5 of 5 in “Rationale for the "Never commit to the right side of a Pull line" rule”
  1. Jerome LovyOct 26, 2006
  2. Linus TorvaldsOct 26, 2006
  3. Karl HasselströmOct 26, 2006
  4. Jakub NarebskiOct 26, 2006
  5. Luben TuikovOct 27, 2006

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.