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

Troubles redirecting git output

From
BCBaptiste Chocot <baptiste.chocot@gmail.com>
Date
Jul 9, 2021, 11:59 UTC
Message-ID
<57ebeb1d-f467-6cbd-5ad9-a55cf04dde34@gmail.com>
Hello guys, hope you're doing great.

I'm reaching out today because I cannot find a fix for my issue. I'm using git 2.25.1 from the debian repo. I'm having difficulties to redirect git stderr, here is an example:

--- $ git init Initialized empty lol/.git/ $ git branch >&2 2>/dev/null fatal: your current branch 'master' does not have any commits yet ---

Is this an expected behavior? I find it weird not to be able to silent git. Are you aware of a workaround? I've been browsing a bit but did not find an answer yet.

Thanks for your time!
Baptiste
Next: Marc Branchaud
Message 1 of 3 in “Troubles redirecting git output”
  1. Baptiste ChocotJul 9, 2021
  2. Marc BranchaudJul 9, 2021
  3. Baptiste ChocotJul 9, 2021

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.