Skip to content

Commit a3f5e7a

Browse files
moygitster
authored andcommitted
push: better error message when no remote configured
Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec8460b commit a3f5e7a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

builtin/push.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,14 @@ static int do_push(const char *repo, int flags)
157157
if (!remote) {
158158
if (repo)
159159
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");
161168
}
162169

163170
if (remote->mirror)

0 commit comments

Comments
 (0)