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

Re: git pull question

From
Geoff Russell <geoffrey.russell@gmail.com>
Date
Jul 26, 2010, 03:51 UTC
Message-ID
<AANLkTikpspDiUf==vCUiBqnQKFgcbag8XXaNYK3COjQu@mail.gmail.com>
In-Reply-To
<AANLkTi=wXGBMUekUhtHS1KCOhjgac3ET8rmSCwUPHzQ3@mail.gmail.com>

On Mon, Jul 26, 2010 at 1:13 PM, Bradley Wagner <bradley.wagner@hannonhill.com> wrote:

Show 13 quoted lines
>> ...
>> $ git checkout master
>> $ git pull origin refs/heads/brA:brA
>>
>> The pull here seems to update both the current branch as well as brA?
>> Is this intentional?
>
> I believe this is intentional.
>
> A git pull always pulls into (at least) the currently checked out
> branch, in your case "master". By adding the <dst> param after the
> colon in the <refspec> you're saying to go ahead and fast-forward
> merge the local branch called "brA" if possible.
Okay.
Show 14 quoted lines
> However, I'm not entirely clear myself on the meaning of this note in
> the documentation:
>
> 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.
Yes, I was wondering about this ... I can't see any downside
Geoff.
Previous: Bradley Wagner
Message 3 of 3 in “git pull question”
  1. Geoff RussellJul 26, 2010
  2. Bradley WagnerJul 26, 2010
  3. Geoff RussellJul 26, 2010

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.