git rm -r --cached . # 清除缓存 git add . # 追踪文件 git commit -m "更新.gitignore" # 注释提交 git push origin "分支名称" # 推送远程