LoginSignup
1
1

More than 5 years have passed since last update.

gitの複数ファイルを一括で削除する

Posted at

何処かで見かけた下記方法ではアラートが現れ削除できず…

git rm git ls-files --deleted

error: unknown option `deleted`'
usage: git rm [options] [--] <file>...

    -n, --dry-run         dry run
    -q, --quiet           do not list removed files
    --cached              only remove from the index
    -f, --force           override the up-to-date check
    -r                    allow recursive removal
    --ignore-unmatch      exit with a zero status even if nothing matched

結局 xargs でOK。

git ls-files --deleted | xargs git rm -f

Ref: "gitの複数のブランチを一括で削除する"
http://qiita.com/satoshi03/items/c53aab17f3270477e33a

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1