概要
-
git add
した時に、以下メッセージが返されることがあったので、その対応方法をメモしておきます。
Untracked files
(use "git add ..." to include in what will be committed)
Untracked filesの意味・対応方法
-
Untracked filesとは、未追跡のファイルという意味。「ステージング(git add)していない新しいファイルがあるぞ」ということです。
-
アトラシアンのgitチュートリアルであるGit Clean | Atlassian Git Tutorialには、以下のように記載されています。
Untracked files are files that have been created within your repo's working directory but have not yet been added to the repository's tracking index using the git add command.
- 自分の場合は、不要なファイルで、削除したい!という趣旨だったので、以下コマンドで解決できます。
-
git clean -n
で内容をチェック -
git clean -f
で削除
-