日本語 ▾
  git-stripspace マニュアルのローカライズ版 
  
  
            
トピック ▾
  
    
      
      
      
    
      
      
      
    
  
            
 最新バージョン ▾  git-stripspace 最終更新日: 2.50.0
  git-stripspace マニュアルの変更履歴 
  
          
          
          
          セットアップと設定
プロジェクトの取得と作成
基本的なスナップショット
ブランチとマージ
プロジェクトの共有と更新
検査と比較
パッチ適用
デバッグ
メール
外部システム
サーバー管理
- 2.50.1 変更なし
- 
        2.50.0
          
            
                             2025-06-16 2025-06-16
- 2.43.1 → 2.49.1 変更なし
- 
        2.43.0
          
            
                             2023-11-20 2023-11-20
- 2.7.6 → 2.42.4 変更なし
- 
        2.6.7
          
            
                                 2017-05-05 2017-05-05
- 2.5.6 変更なし
- 
        2.4.12
          
            
                             2017-05-05 2017-05-05
- 
        2.3.10
          
            
                                 2015-09-28 2015-09-28
- 2.1.4 → 2.2.3 変更なし
- 
        2.0.5
          
            
                                     2014-12-17 2014-12-17
説明
コミットメッセージ、注釈、タグ、ブランチの説明などのテキストを標準入力から読み込み、Gitで使用される方法でクリーンアップします。
引数なしの場合、以下の処理が行われます。
- 
すべての行末の空白文字を削除する 
- 
複数の連続した空行を1つの空行にまとめる 
- 
入力の先頭と末尾の空行を削除する 
- 
必要に応じて、最終行に不足している \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]スイートの一部

