未追踪文件
打开 git 存储仓库的 .gitignore 文件,输入需要排除的文件或文件夹,
# Visual Studio 2015/2017 cache/options directory
.vs/
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
已追踪文件
如果需要忽略之前已经追踪过的文件,仅仅修改 .gitignore 文件是不够的,需要先执行清除缓存命令
$ git rm -r --cached .
$ git add .
$ git commit -m "Update .gitignore"
$ git push