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

Remove total confusion from "git checkout"

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 19, 2005, 17:11 UTC
Message-ID
<Pine.LNX.4.58.0509191009041.9106@g5.osdl.org>

The target to check out does not need to be a branch. The _result_ of the checkout needs to be a branch. Don't confuse the two, and then insult the user.

Insulting is ok, but I personally get really pissed off is a tool is both confused and insulting. At least be _correct_ and insulting.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/git-checkout.sh b/git-checkout.sh
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -23,7 +23,7 @@ while [ "$#" != "0" ]; do
 		;;
 	*)
 		rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) ||
-			die "hey dummy, branch '$arg' doesn't exist."
+			die "I don't know any '$arg'."
 		if [ -z "$rev" ]; then
 			echo "unknown flag $arg"
 			exit 1
Message 1 of 1 in “Remove total confusion from "git checkout"”
  1. Linus TorvaldsSep 19, 2005

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.