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

git checkout's stderr v stdout usage

From
Pprateekrungta <prateek86400@gmail.com>
Date
Aug 6, 2017, 17:53 UTC
Message-ID
<1502042030108-7657477.post@n2.nabble.com>
```
  git checkout -b new_branch 
```

Git does what's asked except that Git's success response ("Switched to a new branch 'new_branch'"), goes to to stderr instead of stdout.

This feels against standard unix conventions of what to output to stderr v stdout. It's an extra jump that people scripting `Git` keep running into when they encounter this behaviour. For e.g. other users have complained about this as far back as 2010: http://git.661346.n2.nabble.com/Bugreport-Git-responds-with-stderr-instead-of-stdout-td4959280.html

I'd like to suggest changing informational messages to stdout, and erroneous ones to stderr. May I submit a patch to change this behaviour?

-- View this message in context: http://git.661346.n2.nabble.com/git-checkout-s-stderr-v-stdout-usage-tp7657477.html Sent from the git mailing list archive at Nabble.com.

Next: rio45
Message 1 of 4 in “git checkout's stderr v stdout usage”
  1. prateekrungtaAug 6, 2017
  2. rio45Nov 27, 2017
  3. nemo54Dec 2, 2017
  4. finnjones0222Aug 18, 2020

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.