English ▾
git-stripspace 手冊的本地化版本
主題 ▾
最新版本 ▾ git-stripspace 最後更新於 2.43.0
git-stripspace 手冊的變更
設定與配置
取得與建立專案
基本快照
分支與合併
分享與更新專案
檢視與比較
修補
除錯
電子郵件
外部系統
伺服器管理
指南
管理
底層命令
- 2.43.1 → 2.47.0 無變更
-
2.43.0
11/20/23
- 2.7.6 → 2.42.3 無變更
-
2.6.7
05/05/17
- 2.5.6 無變更
-
2.4.12
05/05/17
-
2.3.10
09/28/15
- 2.1.4 → 2.2.3 無變更
-
2.0.5
12/17/14
描述
從標準輸入讀取文字,例如 commit 訊息、註解、標籤和分支描述,並以 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] 套件的一部分