LinuxCommandLibrary

git-stripspace

Clean up whitespace in Git messages

TLDR

Strip trailing whitespace

$ git stripspace < [file]
copy
Strip comments
$ git stripspace -s < [file]
copy
Comment out lines
$ git stripspace -c < [file]
copy

SYNOPSIS

git stripspace [options]

DESCRIPTION

git stripspace filters text from stdin, stripping trailing whitespace and collapsing multiple consecutive blank lines. It is used internally by Git for commit message cleanup.
The command can also strip or add comment lines, making it useful for processing Git-formatted messages and templates.

PARAMETERS

-s, --strip-comments

Strip comment lines.
-c, --comment-lines
Comment out lines.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community