@matheusbsbs / matheus-bagliano / commits / a3f5e7a32e
Fork 0

push: better error message when no remote configured

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed Mar 2, 2011 at 21:12 UTC a3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72
1 file changed +8 -1
builtin/push.c
+8 -1
@@ -157,7 +157,14 @@ static int do_push(const char *repo, int flags)
157 if (!remote) {
158 if (repo)
159 die("bad repository '%s'", repo);
160 - die("No destination configured to push to.");
160 + die("No configured push destination.\n"
161 + "Either specify the URL from the command-line or configure a remote repository using\n"
162 + "\n"
163 + " git remote add <name> <url>\n"
164 + "\n"
165 + "and then push using the remote name\n"
166 + "\n"
167 + " git push <name>\n");
168 }
169
170 if (remote->mirror)