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

Re: push.default and "git push"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 29, 2022, 01:28 UTC
Message-ID
<xmqqo7sq4khb.fsf@gitster.g>
In-Reply-To
<CAMhVC3ZHsGJs8XJPZOPYCWBCHJOkp8xnau=5xH_Bj33JUZ4DNA@mail.gmail.com>
Yuri Kanivetsky <yuri.kanivetsky@gmail.com> writes:
> (1) What does "remember" exactly mean?

Because your matching push updates only the branches that exist at the receiving repository, you do not have to remember in your head which branches you want to keep updating over there and write them on your command line (i.e. "git push there this-branch" to update "this-branch" in "there" repository).

You do not have to ask your configuration file to remember (i.e. [remote "there"] push = refs/heads/this-branch), either.

Without having to make an active effort to "remember" on your side, "git push there" would notice that they have this-branch (because you pushed there the last time to create it) and you have updated this-branch on your end, and update that branch.

That is what the verb "remember" refers to in that sentence.
Previous: Yuri KanivetskyNext: Yuri Kanivetsky
Message 2 of 3 in “push.default and "git push"”
  1. Yuri KanivetskyNov 28, 2022
  2. Junio C HamanoNov 29, 2022
  3. Yuri KanivetskyDec 13, 2024

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.