Log.log(work)

いろんな作業メモ

gitで新しく増えたファイル(untracked files)のみ一括で追加する

これはべんり。

git ls-files --others --exclude-standard | xargs git add
  • ls-files → 管理しているファイルを見る
  • --others → 追跡されていないファイルの一覧を表示
  • --exclude-standard → .gitignore にマッチするファイルを含めない
  • xargs → 上記を「git add」の引数にする