15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Git rm をしようとすると「Argument list too long」と出る時の対処法

Last updated at Posted at 2016-01-23

概要

あとからまとめて.gitignoreする方法
上の記事で、gitignoreを参照し、ファイルをまとめてレポジトリーから削除しようとした時に、
-bash: /usr/bin/git: Argument list too long
と、なってしまう問題の対処法

方法

以下のコマンドで実行する

git ls-files --full-name -i --exclude-from=.gitignore | xargs git rm --cached

15
14
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
15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?