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

例如.env

修改 .gitignore

# 加入
.env

执行命令

git rm --cached .env
git commit -m "Remove .env from repository"
git push
posted @ 2024-10-11 10:14  朝阳1  阅读(14)  评论(0)    收藏  举报