# [BUG] git push writes to stderr instead of stdout on success

3 messages from 2014-05-19 to 2014-05-19. Participants: Marat Radchenko, Jeff King.
Thread: https://gitlist.dev/t/36700

## Marat Radchenko, 2014-05-19 15:03

Subject: [BUG] git push writes to stderr instead of stdout on success
Message-ID: <20140519150358.GA3099@seldon>
URL: https://gitlist.dev/e/20140519150358.GA3099%40seldon

```
`git push` writes to stderr instead of stdout

Steps to reproduce:

  mkdir foo
  cd foo
  git init
  echo foo > fo
  git add -A
  git commit -am "foo"
  git push . HEAD:refs/heads/newbranch 2>out

Expected: `out` file is empty

Actual: `out` file contents:

To .
 * [new branch]      HEAD -> newbranch

```

## Jeff King, 2014-05-19 15:49

Subject: Re: [BUG] git push writes to stderr instead of stdout on success
Message-ID: <20140519154909.GD20289@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20140519154909.GD20289%40sigill.intra.peff.net
In-Reply-To: <20140519150358.GA3099@seldon>

```
On Mon, May 19, 2014 at 07:03:58PM +0400, Marat Radchenko wrote:

> `git push` writes to stderr instead of stdout

That's by design.

Which one is correct is largely a matter of philosophy / mental model.
This case has been discussed before:

  http://thread.gmane.org/gmane.comp.version-control.git/180673

Keep in mind also that "git push --porcelain" does go to stdout and is
machine-parsed, so no other messages can go to stdout when that option
is enabled.

-Peff

```

## Marat Radchenko, 2014-05-19 16:43

Subject: Re: [BUG] git push writes to stderr instead of stdout on success
Message-ID: <20140519164319.GA3468@seldon>
URL: https://gitlist.dev/e/20140519164319.GA3468%40seldon
In-Reply-To: <20140519154909.GD20289@sigill.intra.peff.net>

```
On Mon, May 19, 2014 at 11:49:09AM -0400, Jeff King wrote:
> On Mon, May 19, 2014 at 07:03:58PM +0400, Marat Radchenko wrote:
> 
> > `git push` writes to stderr instead of stdout
> 
> That's by design.
> 
> Which one is correct is largely a matter of philosophy / mental model.
> This case has been discussed before:
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/180673
> 
> Keep in mind also that "git push --porcelain" does go to stdout and is
> machine-parsed, so no other messages can go to stdout when that option
> is enabled.

Oh, missed --porcelain switch. Thanks.

```
