Thread (1 message) 1 message, 1 author, 2021-03-08

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

From: Junio C Hamano <hidden>
Date: 2021-03-08 21:21:35

Taylor Blau [off-list ref] writes:
On Mon, Mar 08, 2021 at 09:41:14PM +0100, Andreas Schwab wrote:
quoted
quoted
quoted
quoted
 `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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help