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

Re: remote.<name>.merge missing from the git-config man page?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2021, 21:20 UTC
Message-ID
<xmqq8s6x5olt.fsf@gitster.c.googlers.com>
In-Reply-To
<YEaM7ruZCvaQQbPI@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 10 quoted lines
> On Mon, Mar 08, 2021 at 09:41:14PM +0100, Andreas Schwab wrote:
>> >> >  `git push origin`::
>> >> >  	Without additional configuration, pushes the current branch to
>> >> > -	the configured upstream (`remote.origin.merge` configuration
>> >> > +	the configured upstream (`branch.<name>.merge` configuration
>> >> >  	variable) if it has the same name as the current branch, and
>> >> >  	errors out without pushing otherwise.
>
> ... IOW, "if both your and the remote copy call the
> branch you have checked out the same thing."

Introducing a new term "remote copy" makes it even more confusing at least to me. And you are *not* checking out whatever branch any remote repository has. Your 'master' and my 'master' are different entities.

I actually wonder what configuration the paragraph considers fundamental and mandatory (as opposed to "additional" ones).

At the most basic "I just ran 'git clone' from somewhere" level, remote.origin.url would be set and, branch.master.remote and branch.master.merge are present.

I wonder if we should update the heading and extend the description a bit further, e.g.

	`git push`::
		Without additional configuration, uses the
		`branch.<name>.remote` configuration variable for
		the branch that is currently checked-out to figure
		out which remote to push to, and pushes the current
		branch to update their branch with the same name.
		If `branch.<name>.merge` is set to a name different
		from `<name>`, however, errors out without pushing.
so that it makes it clear that .remote and .merge come in pair.
Previous: Jonathan Nieder
Message 14 of 14 in “remote.<name>.merge missing from the git-config man page?”
  1. Fabien TerraniMar 8, 2021
  2. Eric SunshineMar 8, 2021
  3. Junio C HamanoMar 8, 2021
  4. Taylor BlauMar 8, 2021
  5. Andreas SchwabMar 8, 2021
  6. Taylor BlauMar 8, 2021
  7. Andreas SchwabMar 8, 2021
  8. Taylor BlauMar 8, 2021
  9. Andreas SchwabMar 8, 2021
  10. Taylor BlauMar 8, 2021
  11. Andreas SchwabMar 8, 2021
  12. Junio C HamanoMar 12, 2021
  13. Jonathan NiederMar 13, 2021
  14. Junio C HamanoMar 8, 2021

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.