English ▾
git-stripspace 手册的本地化版本
主题 ▾
Email
最新版本 ▾ git-stripspace 上次更新于 2.43.0
git-stripspace 手册的变更
设置和配置
获取和创建项目
基本快照
分支和合并
共享和更新项目
检查和比较
补丁
调试
外部系统
服务器管理
指南
管理
底层命令
- 2.43.1 → 2.49.0 无变更
-
2.43.0
2023-11-20
- 2.7.6 → 2.42.4 无变更
-
2.6.7
2017-05-05
- 2.5.6 无变更
-
2.4.12
2017-05-05
-
2.3.10
2015-09-28
- 2.1.4 → 2.2.3 无变更
-
2.0.5
2014-12-17
描述
从标准输入读取文本,例如提交消息、注释、标签和分支描述,并以 Git 使用的方式清理它。
不带参数,这将会
-
移除所有行尾的空格
-
将多个连续的空行折叠成一个空行
-
移除输入开头和结尾的空行
-
如果需要,在最后一行添加缺少的\n。
如果输入完全由空格字符组成,则不会产生任何输出。
注意:这旨在清理元数据。 首选 git-apply[1] 的 --whitespace=fix
模式来纠正存储库中补丁或文件的空格。
示例
给定以下嘈杂的输入,其中$表示行尾
|A brief introduction $ | $ |$ |A new paragraph$ |# with a commented-out line $ |explaining lots of stuff.$ |$ |# An old paragraph, also commented-out. $ | $ |The end.$ | $
使用不带参数的git stripspace来获得
|A brief introduction$ |$ |A new paragraph$ |# with a commented-out line$ |explaining lots of stuff.$ |$ |# An old paragraph, also commented-out.$ |$ |The end.$
使用git stripspace --strip-comments来获得
|A brief introduction$ |$ |A new paragraph$ |explaining lots of stuff.$ |$ |The end.$
GIT
属于 git[1] 套件的一部分