---
name: "gitredir"
section: "1"
platform: "linux"
package: "git"
version: "4.3.9-2"
release: "Debian 1.2 (Rex)"
platforms: ["linux"]
url: "https://new.carta.tech/gitredir"
---

# gitredir(1)

GNU Interactive Tools version 4.3.6 - redirection script

## NAME

gitredir - GNU Interactive Tools version 4.3.6 - redirection script

## SYNTAX

*gitredir program arguments ...*

## DESCRIPTION

*gitredir* is a very small script that fools the *git* program, makeing it believe that the command started wrote something to standard error. It was not designed to be used as a stand alone program.

*gitredir* is useful for programs like **du**. We are interested in du's output and we would like to write to the status line its output (especially the output of the 'du -s' command). Normally, this is not possible because 'du -s' will display the information on the standard output ( **git** catches only standard error) and will exit with the exit code 0. **git** will display the standard error contents on the status bar only if the program exit status is not 0.

So, *gitredir* starts a program, sends its standard output through a pipe to a subshell which read from the pipe and write to standard error. After that, *gitredir* exits with the exit code 1. This way, *git* thinks that an error occured and display the standard error redirection file to the status bar. Stupid, but useful.

## BUGS

These manual page is obsolete.  It documents version 4.3.5 of the GNU Interactive Tools package.  Only the GIT's info documentation is being updated.

Please send bug reports to:\
 *tudor@chang.pub.ro*

## SEE ALSO

[git(1)](/git/1.md) [gitps(1)](/gitps/1.md) [gitview(1)](/gitview/1.md) [gitcmp(1)](/gitcmp/1.md) [gitkeys(1)](/gitkeys/1.md) [gitaction(1)](/gitaction/1.md) [gitmount(1)](/gitmount/1.md) [gitrgrep(1)](/gitrgrep/1.md)

## FILES

/usr/bin/gitredir\
 /usr/man/man1/gitredir.1

## AUTHORS

*Tudor Hulubei*\
 \- tudor@chang.pub.ro\
 *Andrei Pitis*\
 \- pink@pub.ro\
 **Politehnica University of Bucharest**\
 **Romania**
