git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: PJ Weisberg <pj@irregularexpressions.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: pushing branches
Date: Sat, 21 Jul 2012 12:33:40 -0700	[thread overview]
Message-ID: <7v7gtwucx7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACnwZYdUzk74znPs4F+xz3haA3QhA9-DbR3mWWEVMfnztp-oCA@mail.gmail.com> (Thiago Farina's message of "Fri, 20 Jul 2012 23:10:56 -0300")

Thiago Farina <tfransosi@gmail.com> writes:

> Do'h, now I can see the idiocy that I was doing.
>
> If I'm understanding this better,
> $ git push origin master
> tells git to push to remote origin, the contents of my master branch.

Yes, add "to the 'master' at the 'origin'" at the end of the
sentence and you are perfect.

> And then,
>
> $ git push origin feature-work
> tells git to push to remote origin to push the contents of feature-work branch.

Yes.

> Hence does not make sense to ask git to do "push origin master" while
> inside feature-work branch.

No.  As long as you know your master is ready and suitable to be
published when you ask "push", the command perfectly makes sense; it
does not matter on what branch you are on.

You may say

	$ git checkout master
        ... work work work ...
        $ make test
        ... ahh, perfection! ...
        $ git checkout -b feature
        ... let's build a bit more ..
        ... while I am having fun, let's not forget to push the
        ... part that is already solid out
        $ git push origin master

and that is perfectly fine without "git checkout master" before
pushing (and "git checkout feature" after to come back to what you
were doing).

  reply	other threads:[~2012-07-21 19:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 15:26 pushing branches Thiago Farina
2012-07-20 15:46 ` Junio C Hamano
2012-07-20 15:49   ` Thiago Farina
2012-07-20 19:19     ` PJ Weisberg
2012-07-21  1:40       ` Thiago Farina
2012-07-21  1:58         ` PJ Weisberg
2012-07-21  2:10           ` Thiago Farina
2012-07-21 19:33             ` Junio C Hamano [this message]
2012-07-22  2:54               ` Thiago Farina
2012-07-22 18:40                 ` Junio C Hamano
2012-07-20 15:46 ` PJ Weisberg
2012-07-20 15:49 ` Konstantin Khomoutov
2012-07-20 15:53 ` Matthieu Moy

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=7v7gtwucx7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pj@irregularexpressions.net \
    --cc=tfransosi@gmail.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 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 NNTP newsgroup(s).