From: Junio C Hamano <gitster@pobox.com>
To: Ed Greenberg <edg@greenberg.org>
Cc: git@vger.kernel.org
Subject: Re: git push origin BRANCHNAME question
Date: Thu, 25 Aug 2016 10:50:23 -0700 [thread overview]
Message-ID: <xmqqr39cn3fk.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <6c4fbb7d-6f67-b454-2b4b-9f5fbeffae9b@greenberg.org> (Ed Greenberg's message of "Thu, 25 Aug 2016 09:16:50 -0400")
Ed Greenberg <edg@greenberg.org> writes:
> I think I understand this from the git-push man page, but I want to
> make sure:
>
> I have two branches, master and develop.
>
> If I am (accidentally) sitting on master, and issue 'git push origin
> develop', does this properly push develop to remote develop, or does
> it push master to remote develop (which seems to be bad, in the most
> common use case.) ?
You can find it out yourself quite easily, I would think.
$ git init src
$ git init dst
$ cd src
$ git commit --allow-empty -m initial
$ git checkout -b develop
$ git commit --allow-empty -m second
$ git checkout master
$ git push ../dst develop
Counting objects: 3, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 226 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To ../dst
* [new branch] develop -> develop
next prev parent reply other threads:[~2016-08-25 17:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 13:16 git push origin BRANCHNAME question Ed Greenberg
2016-08-25 17:50 ` Junio C Hamano [this message]
2016-08-25 18:39 ` Jeff King
-- strict thread matches above, loose matches on Subject: below --
2016-08-25 13:24 Ed Greenberg
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr39cn3fk.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=edg@greenberg.org \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).