将xx文件加入到 .gitignore 文件中,删除git已经存在的记录

qcy-blog / 2024-10-11 / 原文

例如env

git rm --cached .env
git commit -m "Remove .env from repository"
git push