Files
git/builtin
Ramkumar Ramachandra 7b2ecd8108 push: fail early with detached HEAD and current
Setting push.default to current adds the refspec "HEAD" for the
transport layer to handle.  If "HEAD" doesn't resolve to a branch (and
since no refspec rhs is specified), the push fails after some time with
a cryptic error message:

  $ git push
  error: unable to push to unqualified destination: HEAD
  The destination refspec neither matches an existing ref on the remote nor
  begins with refs/, and we are unable to guess a prefix based on the source ref.
  error: failed to push some refs to 'git@github.com:artagnon/git'

Fail early with a nicer error message:

  $ git push
  fatal: You are not currently on a branch.
  To push the history leading to the current (detached HEAD)
  state now, use

    git push ram HEAD:<name-of-remote-branch>

Just like in the upstream and simple cases.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-29 15:34:04 -07:00
..
2013-04-26 15:28:09 -07:00
2013-04-23 11:22:48 -07:00
2013-04-15 11:04:44 -07:00
2012-09-17 15:59:34 -07:00
2013-01-23 21:19:10 -08:00
2012-11-20 10:32:10 -08:00
2013-02-01 12:40:16 -08:00
2012-09-27 17:57:26 -07:00
2013-04-03 09:18:01 -07:00
2013-04-26 15:28:39 -07:00
2012-09-11 11:36:05 -07:00
2013-01-16 12:48:22 -08:00
2012-10-25 06:42:27 -04:00
2012-10-29 03:08:30 -04:00
2012-10-25 06:42:27 -04:00
2013-01-16 12:48:22 -08:00