git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2 v2] push: better error message when no remote configured

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Mar 1, 2011, 09:11 UTC
Message-ID
<1298970662-25828-2-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<1298970662-25828-1-git-send-email-Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
"No configured push destination." (Jay Soffian) and reword.
 builtin/push.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/builtin/push.c b/builtin/push.c
index c949187..b4fba7a 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -156,7 +156,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)
-- 
1.7.4.1.142.ge03e1
Previous: Matthieu MoyNext: Junio C Hamano
Message 8 of 12 in “push: better error messages”
  1. 0/2 push: better error messagesMatthieu Moy, Feb 28, 2011
  2. 1/2 push: better error message when push.default = trackingMatthieu Moy, Feb 28, 2011
  3. 2/2 push: better error messages for detached HEAD and "no destination"Matthieu Moy, Feb 28, 2011
  4. Jay SoffianFeb 28, 2011
  5. Matthieu MoyFeb 28, 2011
  6. Junio C HamanoFeb 28, 2011
  7. 1/2 push: better error messages when push.default = trackingMatthieu Moy, Mar 1, 2011
  8. 2/2 push: better error message when no remote configuredMatthieu Moy, Mar 1, 2011
  9. Junio C HamanoMar 1, 2011
  10. 1/2 push: better error messages when push.default = trackingMatthieu Moy, Mar 2, 2011
  11. 2/2 push: better error message when no remote configuredMatthieu Moy, Mar 2, 2011
  12. Junio C HamanoMar 3, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.