mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 13:02:08 +02:00

* as suggested in #10428 * standard input => `stdin` * standard output => `stdout` * standard error => `stderr` Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
492 B
492 B
git stripspace
Read text (e.g. commit messages, notes, tags, and branch descriptions) from
stdin
and clean it into the manner used by Git. More information: https://git-scm.com/docs/git-stripspace.
- Trim whitespace from a file:
cat {{path/to/file}} | git stripspace
- Trim whitespace and Git comments from a file:
cat {{path/to/file}} | git stripspace --strip-comments
- Convert all lines in a file into Git comments:
git stripspace --comment-lines < {{path/to/file}}