All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Michael Darling <darlingm@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: BUG: For first push to a bare repo, using "--tags" prevents creation of master branch
Date: Fri, 29 May 2015 07:35:36 +0200	[thread overview]
Message-ID: <vpqbnh4hro7.fsf@anie.imag.fr> (raw)
In-Reply-To: <CABRuA+iVRZR9SxvYVCO5zd0hZEbn6tioyP6dZ5xSbaAeNF4w+w@mail.gmail.com> (Michael Darling's message of "Thu, 28 May 2015 20:10:42 -0400")

Michael Darling <darlingm@gmail.com> writes:

> $ git push --tags --set-upstream origin

[...]

> Note this time there is NO:
>
>  * [new branch]      master -> master
> Branch master set up to track remote branch master from origin.

man git-push says:

SYNOPSIS
       git push [...] [<repository> [<refspec>...]]
[...]
       --tags
           All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command
           line.

You did not provide any refspec (you provided <repository> but not
<refspec>), hence --tags pushes only tags. So, this is the expected
behavior.

That said, we may want to add an option like --tags-also that would push
tags _in addition_ to what would normally be pushed. --follow-tags does
more or less this, though, but only for annotated tags pointing at a ref
being pushed.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2015-05-29  5:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  0:10 BUG: For first push to a bare repo, using "--tags" prevents creation of master branch Michael Darling
2015-05-29  5:35 ` Matthieu Moy [this message]
2015-05-29 15:21   ` Junio C Hamano
2015-05-29 15:45     ` Matthieu Moy
2015-05-29 16:05       ` Junio C Hamano
2015-05-29 16:40         ` Junio C Hamano
2015-05-29 17:53         ` Matthieu Moy
2015-05-29 18:03           ` Junio C Hamano
2015-06-02 23:48           ` Not a " Junio C Hamano

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=vpqbnh4hro7.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=darlingm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.