# Wrong configuration variable mentioned in git-push documentation (examples section)

2 messages from 2021-02-22 to 2021-02-25. Participants: Adam Sharafeddine, Philippe Blain.
Thread: https://gitlist.dev/t/55182

## Adam Sharafeddine, 2021-02-22 05:07

Subject: Wrong configuration variable mentioned in git-push documentation (examples section)
Message-ID: <CAAxrY9yjTKV8-K0AmO4fBmtDrSB4KkN_xKOMmtSb-dvixJNaEQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAAxrY9yjTKV8-K0AmO4fBmtDrSB4KkN_xKOMmtSb-dvixJNaEQ%40mail.gmail.com

```
Hello

In the file Documentation/git-push.txt under the EXAMPLES section,
specifically under
`git push origin`::, remote.origin.merge configuration variable is
said to configure the
upstream branch for the origin remote, when in fact it should be
branch.<name>.merge,
where <name> is the name of the local branch at which HEAD is
currently pointing to.

Here's en excerpt:

> `git push origin`::
>         Without additional configuration, pushes the current branch to
>         the configured upstream (`remote.origin.merge` configuration
>         variable) if it has the same name as the current branch, and
>         errors out without pushing otherwise.


I'm still learning Git so I thought I would share this with you (I got
confused reading
the examples). Maybe I'll learn something new or/and correct the
aforementioned error.

Regards

--
Adam

```

## Philippe Blain, 2021-02-25 13:57

Subject: Re: Wrong configuration variable mentioned in git-push documentation (examples section)
Message-ID: <1fd7d816-1572-8563-1c4d-4be83926e4a2@gmail.com>
URL: https://gitlist.dev/e/1fd7d816-1572-8563-1c4d-4be83926e4a2%40gmail.com
In-Reply-To: <CAAxrY9yjTKV8-K0AmO4fBmtDrSB4KkN_xKOMmtSb-dvixJNaEQ@mail.gmail.com>

```
Hi Adam,

Le 2021-02-22 à 00:07, Adam Sharafeddine a écrit :
> Hello
> 
> In the file Documentation/git-push.txt under the EXAMPLES section,
> specifically under
> `git push origin`::, remote.origin.merge configuration variable is
> said to configure the
> upstream branch for the origin remote, when in fact it should be
> branch.<name>.merge,
> where <name> is the name of the local branch at which HEAD is
> currently pointing to.
> 
> Here's en excerpt:
> 
>> `git push origin`::
>>          Without additional configuration, pushes the current branch to
>>          the configured upstream (`remote.origin.merge` configuration
>>          variable) if it has the same name as the current branch, and
>>          errors out without pushing otherwise.
> 
> 
> I'm still learning Git so I thought I would share this with you (I got
> confused reading
> the examples). Maybe I'll learn something new or/and correct the
> aforementioned error.
> 

You are completely right, that example seems to use an old and now non-existent
(at least, undocumented in git-config(1) [1]) configuration variable.
I encourage you to fix it yourself and submit a patch :) See [2] for a nice tutorial on
how to do this if you are interested.

Cheers,
Philippe.


[1] https://git-scm.com/docs/git-config
[2] https://git-scm.com/docs/MyFirstContribution

```
