Skip to content

Commit

Permalink
push: better error message when no remote configured
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Mar 2, 2011
1 parent ec8460b commit a3f5e7a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion builtin/push.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,14 @@ static int do_push(const char *repo, int flags)
if (!remote) {
if (repo)
die("bad repository '%s'", repo);
die("No destination configured to push to.");
die("No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote repository using\n"
"\n"
" git remote add <name> <url>\n"
"\n"
"and then push using the remote name\n"
"\n"
" git push <name>\n");
}

if (remote->mirror)
Expand Down

0 comments on commit a3f5e7a

Please sign in to comment.