Code

push: better error message when no remote configured
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Wed, 2 Mar 2011 20:12:11 +0000 (21:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Mar 2011 23:34:26 +0000 (15:34 -0800)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/push.c

index 1b493fb5a96219ddaa05bd6286a1d643f8b7d58d..c3c2feb9449b5cd3539c18b58ce0fb2886a623b9 100644 (file)
@@ -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)