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

Re: branch --set-upstream considered harmful

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Jun 7, 2010, 05:10 UTC
Message-ID
<AANLkTikUkkWQl7cYuPiKGaJFYL_JlIGFCXXf7En8t0FN@mail.gmail.com>
In-Reply-To
<AANLkTiln_xxnF-e33YA7kkfbBBcBMd40xag8JTW0eqws@mail.gmail.com>
Hi,
On Mon, Jun 7, 2010 at 3:21 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
Show 7 quoted lines
> Say I have an existing branch and it doesn't have a tracking config.
> (My local users often just do "checkout -b topic" instead of "checkout
> -b topic origin/master".)
>
> I would naively expect this to work, while on that branch:
>
>  (topic)$ git branch --set-upstream origin/master

Hmm, I can see where the confusion is coming from - you're treating git-branch as a "branch modifier", when it really is a "branch creator" - unless you use -f, of course.

Show 6 quoted lines
> [snip]
> So here's how I'm thinking about fixing it, but maybe I'm just making
> it even more confusing. What say you:
>
>  (topic)$ git branch --set-upstream=origin/master
>  Branch topic set up to track remote branch master from origin.
I was under the impression that long-style options took "=".
-- 
Cheers,
Ray Chuan
Previous: Jay SoffianNext: Jay Soffian
Message 2 of 6 in “branch --set-upstream considered harmful”
  1. Jay SoffianJun 6, 2010
  2. Tay Ray ChuanJun 7, 2010
  3. Jay SoffianJun 7, 2010
  4. Thomas RastJun 7, 2010
  5. Jay SoffianJun 7, 2010
  6. Michael J GruberJun 7, 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.