常にgit status
いくつかのファイルを実行すると、追跡されていないものとしてリストされます。しかし、実行するたびにそれらをそこにリストしたくありませんgit status
。私が理解しているように、これらのファイルを.gitignore
-file に追加する必要があります。
私のプロジェクトには、無視したいファイル.classpath
とディレクトリがあります。.gradle/*
私の.gitignore
ファイルは次のようになります。
.classpath
.gradle/*
しかし、これらのファイルは、実行するとまだ「追跡されていない」としてリストされますgit status
。ファイルに何か問題がありますか、.gitignore
またはこれを修正するにはどうすればよいですか?
ここに私のgit status
出力があります:
C:\myproject>git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: src/Test.java
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .classpath
# .gitignore
# .gradle/
no changes added to commit (use "git add" and/or "git commit -a")