← 返回命令列表

Linux command

git-stripspace 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Strip trailing whitespace

git stripspace < [file]

Strip comments

git stripspace -s < [file]

Comment out lines

git stripspace -c < [file]

说明

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.

参数

-s, --strip-comments
Strip comment lines.
-c, --comment-lines
Comment out lines.

FAQ

What is the git-stripspace command used for?

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.

How do I run a basic git-stripspace example?

Run `git stripspace < [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -s, --strip-comments do in git-stripspace?

Strip comment lines.