Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

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

From: Miles Bader <hidden>
Date: 2016-06-15 22:50:35

Jay Soffian [off-list ref] writes:
On Thu, Feb 17, 2011 at 12:19 AM, Miles Bader [off-list ref] wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help