From: Junio C Hamano <gitster@pobox.com>
To: Ximin Luo <infinity0@gmx.com>
Cc: git@vger.kernel.org
Subject: Re: push.default=upstream doesn't play nicely with remote.pushdefault/branch.*.pushremote
Date: Tue, 10 Sep 2013 09:06:29 -0700 [thread overview]
Message-ID: <xmqqsixczmnu.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <522F1A61.3010805@gmx.com> (Ximin Luo's message of "Tue, 10 Sep 2013 14:10:57 +0100")
Ximin Luo <infinity0@gmx.com> writes:
> (Please CC me as I am not subscribed.)
>
> $ git config -l | grep '^branch.master\|^push.'
> push.default=upstream
> branch.master.remote=upstream
> branch.master.merge=refs/heads/master
> branch.master.pushremote=origin
>
> $ git branch
> * master
>
> $ git push
> fatal: You are pushing to remote 'origin', which is not the upstream of
> your current branch 'master', without telling me what to push
> to update which remote branch.
>
> push.default=upstream means "push back where it came from (*)". However, if I specifically define remote.pushdefault or branch.*.pushremote, this clearly means I don't want to do (*) in this case.
I think this was discussed on the list during the last development
cycle. Please check the list archive.
"git config --help" has this to say about it:
* `upstream` - push the current branch back to the branch whose
changes are usually integrated into the current branch (which is
called `@{upstream}`). This mode only makes sense if you are
pushing to the same repository you would normally pull from
(i.e. central workflow).
* `simple` - in centralized workflow, work like `upstream` with an
added safety to refuse to push if the upstream branch's name is
different from the local one.
When pushing to a remote that is different from the remote you normally
pull from, work as `current`.
next prev parent reply other threads:[~2013-09-10 16:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 13:10 push.default=upstream doesn't play nicely with remote.pushdefault/branch.*.pushremote Ximin Luo
2013-09-10 16:06 ` Junio C Hamano [this message]
2013-09-11 0:38 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsixczmnu.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=infinity0@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.