git .gitignore忽略了文件,每次提交还是会变更这个文件
.gitignore文件内容:java/.idea/workspace.xml doc/*.tmp *.xml 每次commit都会有workspace.xml这个文件.
java/.idea/workspace.xml doc/*.tmp *.xml
Because you have added him tracked file里了 用git rm --cached java/.idea/workspace.xml Remove him
tracked file
git rm --cached java/.idea/workspace.xml
.gitignore This file is used for the ignore list of untracked files If you use add将文件标记为 tracked status .gitignore, it will be invalid
untracked
add
tracked
Because you have added him
tracked file
里了 用git rm --cached java/.idea/workspace.xml
Remove him
.gitignore This file is used for the ignore list of
untracked
filesIf you use
add
将文件标记为tracked
status .gitignore, it will be invalid