git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Aghiles <aghilesk@gmail.com>
Cc: git list <git@vger.kernel.org>
Subject: Re: git push in --tracked branches.
Date: Wed, 21 Apr 2010 20:44:33 -0400	[thread overview]
Message-ID: <20100422004433.GC14249@coredump.intra.peff.net> (raw)
In-Reply-To: <y2w3abd05a91004211702qf4cd42bau20ac52a4d35a6bf1@mail.gmail.com>

On Wed, Apr 21, 2010 at 08:02:49PM -0400, Aghiles wrote:

> So I created a branch that tracks 'origin' which is remote:
> 
>   git checkout -b small_fixes origin
> 
> I can do a 'git pull' and everything works as expected. I did some
> commits in this branch and I issue a 'git push'. To my surprise
> the 'git push' is still operating on the master and not the current
> 'small_fixes' branch! What is the rationale behind this ? I would
> expect to push from my current branch to origin (especially that
> I am --tracking origin).

"git push" will by default push matching refs. This has been the
behavior since day one. See the description of push.default in "git help
config" for other options (I think you want "tracking").

-Peff

  reply	other threads:[~2010-04-22  0:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22  0:02 git push in --tracked branches Aghiles
2010-04-22  0:44 ` Jeff King [this message]
2010-04-22  1:13   ` Aghiles
2010-04-22  1:52     ` Jeff King
2010-04-22 19:52       ` Aghiles

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=20100422004433.GC14249@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=aghilesk@gmail.com \
    --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.
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).