git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thiago Farina <tfransosi@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: PJ Weisberg <pj@irregularexpressions.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: pushing branches
Date: Sat, 21 Jul 2012 23:54:21 -0300	[thread overview]
Message-ID: <CACnwZYcP7Ke-zyMLT8JBGt_BHS22G4cN6GYe+yauxXF6cVLZ1g@mail.gmail.com> (raw)
In-Reply-To: <7v7gtwucx7.fsf@alter.siamese.dyndns.org>

On Sat, Jul 21, 2012 at 4:33 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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).
In my case it wouldn't because I do not modify my master branch, I
just fetch upstream, merge upstream/master into my local master branch
and switch to feature-work, then git push origin master will always
give me "Everything up-to-date" I suppose (that is what always happen
in my case/workflow).

And just learned, the answer to my question is, while in feature-work
branch, 'git push origin feature-work'. Which does what I wanted.

  reply	other threads:[~2012-07-22  2:54 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
2012-07-22  2:54               ` Thiago Farina [this message]
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=CACnwZYcP7Ke-zyMLT8JBGt_BHS22G4cN6GYe+yauxXF6cVLZ1g@mail.gmail.com \
    --to=tfransosi@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pj@irregularexpressions.net \
    /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).