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

Re: set-upstream for existing branch...?

From
Miles Bader <miles@gnu.org>
Date
Feb 17, 2011, 07:11 UTC
Message-ID
<buo8vxfxhhy.fsf@dhlpc061.dev.necel.com>
In-Reply-To
<AANLkTikqj8NjLwR647E1tHUuDO=OitUJ1dm5Fs7gtXXt@mail.gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 15 quoted lines
> On Thu, Feb 17, 2011 at 12:19 AM, Miles Bader <miles@gnu.org> wrote:
>> Is there a convenient, intuitive, way to set (or change) @{upstream} for
>> the current branch, without doing anything else...?
>
> $ git branch <current_branch> --set-upstream <new_upstream>
>
> But note that this is deceptive: what's important is the relative
> positions of <current_branch> and <new_upstream> on the command-line,
> and they must be in that order. It doesn't (currently) matter where
> you place the --set-upstream.
>
> I've got it on my todo list to make --set-upstream take <new_upstream>
> as its argument so that you can just say:
>
> $ git branch --set-upstream <new_upstream>
Thanks, the latter sounds nice, but for now the former is good for an alias...
-miles
-- 
Dictionary, n.  A malevolent literary device for cramping the growth of
a language and making it hard and inelastic. This dictionary, however,
is a most useful work.
Previous: Jay SoffianNext: Miles Bader
Message 3 of 8 in “set-upstream for existing branch...?”
  1. Miles BaderFeb 17, 2011
  2. Jay SoffianFeb 17, 2011
  3. Miles BaderFeb 17, 2011
  4. Miles BaderFeb 17, 2011
  5. Jay SoffianFeb 17, 2011
  6. Michael J GruberFeb 17, 2011
  7. knittlFeb 17, 2011
  8. Michael J GruberFeb 17, 2011

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.