Re: [PATCH] Include a git-push example for creating a remote branch

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Include a git-push example for creating a remote branch

From: Miles Bader <hidden>
Date: 2016-06-15 22:43:33

"Shawn O. Pearce" [off-list ref] writes:
Many users get confused when `git push origin master:foo` works
when foo already exists on the remote repository but are confused
when foo doesn't exist as a branch and this form does not create
the branch foo.
Hmm, what _does_ it do in that case...?

-Miles

-- 
If you can't beat them, arrange to have them beaten.  [George Carlin]

Re: [PATCH] Include a git-push example for creating a remote branch

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:33

Miles Bader [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
Many users get confused when `git push origin master:foo` works
when foo already exists on the remote repository but are confused
when foo doesn't exist as a branch and this form does not create
the branch foo.
Hmm, what _does_ it do in that case...?
error: dst refspec experimental does not match any existing ref on the remote and does not start with refs/.

-- 
Shawn.

Re: [PATCH] Include a git-push example for creating a remote branch

From: Miles Bader <hidden>
Date: 2016-06-15 22:43:33

On 9/6/07, Shawn O. Pearce [off-list ref] wrote:
Miles Bader [off-list ref] wrote:
quoted
quoted
Many users get confused when `git push origin master:foo` works
when foo already exists on the remote repository but are confused
when foo doesn't exist as a branch and this form does not create
the branch foo.
Hmm, what _does_ it do in that case...?
error: dst refspec experimental does not match any existing ref on the remote and does not start with refs/.
Hmm, I'm assuming people don't want to default to just creating a new
remote ref ('cause it might be too easy to muck up a remote archive
that way), but it seems like it would be nice to have a "prettier" way
to create a remote ref than explicitly giving the whole ref path on
the remote side.

Maybe I"m weird, but I tend to think of the refs/... syntax as being
for "only if you're doing something funny" cases.

I'm thinking of something like:

  ... create new local branch "zoink" ...
  git push --create origin zoink

-Miles

-- 
Do not taunt Happy Fun Ball.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help