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

Re: pushing branches

From
PJ Weisberg <pj@irregularexpressions.net>
Date
Jul 21, 2012, 01:58 UTC
Message-ID
<CAJsNXT=-Ap0zJqK2F_3uJ7secmq7uvnSc218x+NoYdO5pLJAMg@mail.gmail.com>
In-Reply-To
<CACnwZYe03VzR0=m6oCo8X6y=iiLkZXi+xQpvW9goya0roU+PFQ@mail.gmail.com>
On Fri, Jul 20, 2012 at 6:40 PM, Thiago Farina <tfransosi@gmail.com> wrote:
Show 13 quoted lines
> On Fri, Jul 20, 2012 at 4:19 PM, PJ Weisberg
> <pj@irregularexpressions.net> wrote:
>> On Fri, Jul 20, 2012 at 8:49 AM, Thiago Farina <tfransosi@gmail.com> wrote:
>>
>>> 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.
>>
>> In that case, do exactly what you did, except don't checkout master.
>>
> Why you suggest that? If I demonstrated that origin master or just
> origin in the current branch doesn't do what I want, i.e, push it to
> github.

In your original email, you had one command that did what you wanted and one that didn't.

$ git push origin master $ git push origin feature-work

Can you spot the difference between them?

Like Konstantin said, you can look into the different options for push.default, but don't expect Git to push one branch when you told it to push another.

-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced.

Previous: Thiago FarinaNext: Thiago Farina
Message 6 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.