2
1

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 5 years have passed since last update.

gitでuntrackedファイルを削除する方法

Last updated at Posted at 2019-03-06

untrackeファイルについては、git checkout .で削除できないため、調査

$ git clean --dry-run
 # 削除されるuntracked filesを表示

$ git clean -d --dry-run
 # 削除されるuntracked files%&directoriesを表示

$ git clean -df .
 # カレントディレクトリ配下の untrackedファイルとフォルダを削除する

untracked ファイル(-d: ディレクトリも含め) を 強制的に(-f) 削除する

git-clean - Remove untracked files from the working tree

2
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?