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

Re: pushing branches

From
Thiago Farina <tfransosi@gmail.com>
Date
Jul 20, 2012, 15:49 UTC
Message-ID
<CACnwZYchBpSsvfY_-cu33dmPateNPgYaPr822Ri=Xn6=V0OOnA@mail.gmail.com>
In-Reply-To
<7vhat2toz8.fsf@alter.siamese.dyndns.org>
On Fri, Jul 20, 2012 at 12:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> Thiago Farina <tfransosi@gmail.com> writes:
>
>> How can I push a working branch to github inside it?
>>
>> E.g:
>>
>> # On master:
>> $ git checkout -b feature-work
>>
>> # On feature-work
>> # vi, hack, commit, ready to push
>> $ git push origin master # here I expected it would working pushing my
>
> "git push origin master" is a short-hand for "git push origin
> refs/heads/master:refs/heads/master" to update their master branch
> with what you have in your master branch.
>
> See output from
>
>     $ git push --help
>
> for details.
>
> I think you are trying to update, while on your feature-work branch,
> their master with your feature-work branch (or more generally, the
> current HEAD), so
>
>     $ git push origin HEAD:master
>
> is perhaps what you are looking for?

What I'm looking for is to upload/create the remote branch in github from inside my local branch, without having to checkout master in order to do so.

Previous: Junio C HamanoNext: PJ Weisberg
Message 3 of 13 in “pushing branches”
  1. Thiago FarinaJul 20, 2012
  2. Junio C HamanoJul 20, 2012
  3. Thiago FarinaJul 20, 2012
  4. PJ WeisbergJul 20, 2012
  5. Thiago FarinaJul 21, 2012
  6. PJ WeisbergJul 21, 2012
  7. Thiago FarinaJul 21, 2012
  8. Junio C HamanoJul 21, 2012
  9. Thiago FarinaJul 22, 2012
  10. Junio C HamanoJul 22, 2012
  11. PJ WeisbergJul 20, 2012
  12. Konstantin KhomoutovJul 20, 2012
  13. Matthieu MoyJul 20, 2012

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.