我有下面的git .gitignore文件为wordpress网站。
# ignore everything in the root except the "wp-content" directory.
!wp-content/
# ignore everything in the "wp-content" directory, except:
# "mu-plugins", "plugins", "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# ignore these plugins
wp-content/plugins/hello.php
# ignore specific themes
wp-content/themes/twenty*/
# ignore node dependency directories
node_modules/
# ignore log files and databases
*.log
*.sql
*.sqlite现在,当我对我的wp_config.php文件或wp-content文件夹之外的任何其他文件进行了一些更改时,git会对更改的文件进行计数,并弹出提交更改的选项。我使用的是VS代码编辑器。
发布于 2020-11-04 15:10:37
您是否在初始化存储库(运行git init)后创建了.gitignore文件?
如果是,那么你需要清除Git的缓存。尝试在命令行上运行git rm -r --cached .。
https://stackoverflow.com/questions/64675424
复制相似问题