git stripspace
all
Read text (e.g. commit messages, notes, tags, and branch descriptions) from `stdin` and clean it into the manner used by Git.
More info →Options (2)
-s, --strip-commentsbooleanTrim whitespace and Git comments from a file
Example:
cat {{path/to/file}} | git stripspace {{[-s|--strip-comments]}}-c, --comment-linesbooleanConvert all lines in a file into Git comments
Example:
git < {{path/to/file}} stripspace {{[-c|--comment-lines]}}Examples (3)
Trim whitespace from a file
cat path/to/file | git stripspaceTrim whitespace and Git comments from a file
cat path/to/file | git stripspace [-s|--strip-comments]Convert all lines in a file into Git comments
git < path/to/file stripspace [-c|--comment-lines]made by @shridhargupta | data from tldr-pages