git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Mark Florian <mflorian@gitlab.com>
To: git@vger.kernel.org
Subject: `@` alias for `HEAD` not working in `git push -u origin @`
Date: Wed, 10 Jul 2019 13:06:08 +0800	[thread overview]
Message-ID: <CANC=f2c8eynWJ1r=zwZq1qwrDE85LVFMU2mjLU26HYMDGaD4iA@mail.gmail.com> (raw)

Hello!

I learned today that `@` is a shortcut for `HEAD`. From `git help reivisions`:

    @ alone is a shortcut for HEAD.

However, when I tried to use it in a command I frequently use, I got an error:

    $ git push -u origin @
    fatal: invalid refspec '@'

I'm running git version 2.22.0 on Linux.

Is this a bug, or have I misunderstood how this is supposed to work?

Cheers,
Mark

             reply	other threads:[~2019-07-10  5:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  5:06 Mark Florian [this message]
2019-07-10 23:39 ` `@` alias for `HEAD` not working in `git push -u origin @` brian m. carlson
2019-07-11  9:46   ` Johannes Schindelin
2019-07-11 14:48     ` brian m. carlson
2019-07-12 10:29       ` Johannes Schindelin
2019-07-31  5:58   ` Jeff King
2019-07-31 16:10     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANC=f2c8eynWJ1r=zwZq1qwrDE85LVFMU2mjLU26HYMDGaD4iA@mail.gmail.com' \
    --to=mflorian@gitlab.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).