summaryrefslogtreecommitdiff
path: root/builtin/push.c
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2011-03-02 20:12:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-03-02 23:34:26 (GMT)
commita3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72 (patch)
treef6a159141514ae229d9448775e9824bfbf7de4f0 /builtin/push.c
parentec8460bd91007f0bd7851cd07494d1019a39937f (diff)
downloadgit-a3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72.zip
git-a3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72.tar.gz
git-a3f5e7a32ec2d885fe6ff7fc14ee91de391f1d72.tar.bz2
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>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/push.c b/builtin/push.c
index 1b493fb..c3c2feb 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 <name> <url>\n"
+ "\n"
+ "and then push using the remote name\n"
+ "\n"
+ " git push <name>\n");
}
if (remote->mirror)