Re: pushing branches
- From
Thiago Farina <tfransosi@gmail.com>
- Date
- Jul 22, 2012, 02:54 UTC
- Message-ID
- <CACnwZYcP7Ke-zyMLT8JBGt_BHS22G4cN6GYe+yauxXF6cVLZ1g@mail.gmail.com>
- 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:
Show 24 quoted lines
> 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.