【发布时间】:2020-09-10 18:43:16
【问题描述】:
我有一个 Laravel 项目,当我推送到 GitHub 时,我的 .gitignore 目录仍然会推送到 GitHub:
git add .
git commit -m "Sample commit."
git remote add origin git@github.com:My.git
git push origin master
storage/framework/ 中的所有缓存和会话数据都被推送到 GitHub,即使 storage/framework/ 有 .gitignore。所有其他带有 .gitignore 的目录也被推送到 GitHub。
我做错了什么?
【问题讨论】:
-
检查是否为 #1。 .gitignore 文件位于存储库的根文件夹中(不是必需的,但建议使用)#2。 gitignored 模式/路径相对于 gitignore 文件位置 #3 正确指定。 gitignore 文件中的模式是正确的。为了更清楚,您可以在代码中添加文件夹结构和 .gitignore 文件
标签: github github-actions github-cli