From a3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Wed, 2 Mar 2011 21:12:11 +0100 Subject: [PATCH] push: better error message when no remote configured Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- builtin/push.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/push.c b/builtin/push.c index 1b493fb5a..c3c2feb94 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -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 \n" + "\n" + "and then push using the remote name\n" + "\n" + " git push \n"); } if (remote->mirror) -- 2.26.2