昨晚我有一个干净的工作目录,并从 Git 存储库中引入了一个克隆。但现在我的本地服务器创建并包含一个我想忽略的 stats 文件夹。
当我运行 git status 时,我似乎无法让 Git 忽略此文件夹。
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: app_public/views/pages/privacy.php
new file: app_public/views/pages/terms.php
new file: public_html/stats/ctry_usage_200908.png
new file: public_html/stats/daily_usage_200908.png
new file: public_html/stats/dns_cache.db
new file: public_html/stats/hourly_usage_200908.png
new file: public_html/stats/index.html
new file: public_html/stats/usage.png
new file: public_html/stats/usage_200908.html
new file: public_html/stats/webalizer.current
new file: public_html/stats/webalizer.hist
Changed but not updated:
modified: .gitignore
我在 .gitignore 中添加了几行不同的行,但它仍在尝试添加它们:
public_html/stats
public_html/stats/**
public_html/stats/**/*
public_html/stats/*