.gitignore

git中将已跟踪的文件添加到.gitignore

环境配置文件.env之前被push到远端仓库了,现需要将其从代码库中删除并清除跟踪。 备注:操作前请先备份有用的文件内容。 添加.gitignore文件,编辑内容: .env 执行操作: git pull git rm -r –cached . git add . git commit -m “add .gitignore” git push

Scroll to top