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

Re: Making it possible to do “git push origin” instead of “git push origin <branch>”, without having to one-time prepare each branch for it

From
Stefan Monov <logixoul@gmail.com>
Date
Dec 22, 2016, 21:18 UTC
Message-ID
<CAJtFkWuypdH+ikdXL=-DXOx-8F+34nV3phqO2jTGoqtnM7=DZA@mail.gmail.com>
In-Reply-To
<CAJtFkWtjowyGaFfsCVd-HAZM2-3e0=CkkyYfxne8KRdYq5kJ9g@mail.gmail.com>

Also, if I do the "setup" step (`push -u`) for a branch that doesn't exist yet (neither on my PC nor on the server), does that remove the need to do `git checkout -b <branch>` first?

On Thu, Dec 22, 2016 at 11:14 PM, Stefan Monov <logixoul@gmail.com> wrote:
Show 30 quoted lines
> Hi.
>
> I'd like to use just:
>
>     git push
>
> or at most:
>
>     git push origin
>
> rather than having to first check which is the active branch with `git
> branch --list`, then type:
>
>     git push origin <branch>
>
> At [1] and [2] I've seen that if I do this once:
>
>     git push -u origin <branch>
>
> then from then on I can use just `git push` _for that branch_.
> However, I don't want to do this "setup" step for each branch, because
> it's extra work that I also may forget to do.
>
> Why is this "setup" step necessary and can I avoid it?
>
> Thanks,
> Stefan
>
> [1] http://stackoverflow.com/q/19312622
> [2] http://stackoverflow.com/q/6529136
Previous: Stefan MonovNext: Junio C Hamano
Message 2 of 5 in “Making it possible to do “git push origin” instead of “git push origin <branch>”, without having to one-time prepare each branch for it”
  1. Stefan MonovDec 22, 2016
  2. Stefan MonovDec 22, 2016
  3. Junio C HamanoDec 22, 2016
  4. Jacob KellerDec 22, 2016
  5. Stefan MonovDec 27, 2016

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.