System Grab Bag

View all TLDR pages from common (or from all pages)

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}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.