On Thu, May 23, 2013 at 11:10:32AM -0700, Junio C Hamano wrote:
> Felipe Contreras <felipe.contre...@gmail.com> writes:
> > On Thu, May 23, 2013 at 5:53 AM, Michael S. Tsirkin <m...@redhat.com> wrote:
> >> Looks like push can't resolve tags to commits.
> >> Why is that?
> >>
> >> linux$ git push -f $PWD v3.10-rc2:refs/heads/vhost-next
> >
> > Perhaps v3.10-rc2^{}. Yeah, totally and completely not-user-friendly,
> More commonly "v3.10-rc2^0:vhost-next", if you are truly pushing it
> out to a remote repository, but then it invites a puzzlement "What
> do you plan to do next after pushing?  The only reason v3.10-rc2 is
> used is because there is not yet a local branch that will host the
> vhost-next changes that is built on top of that tag (otherwise you
> would be pushing that branch to vhost-next)".

This was just a bad example.
The real reason is this:

I have a development branch, vhost-next. I have a tag there
like for_linus for things that are ready to go out.
I don't always point it at the tip of the branch
since I might want to rebase/amend X last commits.

It's a tag and not a branch since I need to sign the tag.
I push to a branch and not just the tag since this way
people can track it and do downstream development on top.
So pushing the tag to branch would save me some churn.

> But in this particular case, you are force-pushing into the current
> repository, and it is spelled much more commonly
>     git branch -f vhost-next v3.10-rc2
> I would think.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to