.gitignore 被 git gui 忽略了



我正在使用git gui。尝试排除某些文件(*.dll、*.pdb - 例如,从我的未暂存更改列表中(。 我有一个 .gitignore 文件 (UTF-8(,与 .git 文件夹位于同一文件夹中。 对于测试用例,我正在尝试删除 *.dll 文件(我过去已经提交了此类文件 - 我只是不希望它们在进行新版本后出现在未暂存的更改中(。 这是我的.gitignore 文件内容:

# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

#server side
*.dll
*.pdb
*.suo
*.cache
*.ide-wal
*.out

我做错了什么?

我错过了使 .gitignore 与已经跟踪的文件处于活动状态的重要步骤。我在这个堆栈溢出问题中找到了解决方案: .gitignore 被 Git 忽略

通过执行这些命令,我解决了问题(在确保提交所有文件之后(: git rm -r --cached git add . git commit -m "修复了未跟踪的文件">

  • 这使我的文件无法跟踪 - 比我需要的更多 - 现在我需要弄清楚如何再次控制它们

最新更新