LoginSignup
1
1

More than 1 year has passed since last update.

【Git】Untracked filesの意味と対応方法について。git cleanで解決する!

Posted at

概要

  • 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 で削除
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