忽略prestashop(git)的缓存

忽略prestashop(git)的缓存,git,prestashop,Git,Prestashop,我目前正在为prestashop主题工作,并生成大量缓存。 我的存储库如下所示: /font /psd (design) /PRESTA /goride (prestashop directory) /cache /config /mails /... (other prestashop folders and files) 我在/PRESTA/goride中添加了以下由gtignore.io生成的.gtignore: # Directories content cache

我目前正在为prestashop主题工作,并生成大量缓存。 我的存储库如下所示:

/font
/psd (design)
/PRESTA 
 /goride (prestashop directory)
  /cache
  /config
  /mails
  /... (other prestashop folders and files)
我在/PRESTA/goride中添加了以下由gtignore.io生成的.gtignore:

# Directories content
cache/class_index.php
cache/smarty/cache/*
!cache/smarty/cache/index.php
cache/smarty/compile/*
!cache/smarty/compile/index.php
cache/tcpdf/*
!cache/tcpdf/index.php

config/xml/*.xml
config/settings.inc.php

log/*.log

img/*
!img/index.php
!img/*/index.php

tools/smarty*/cache/*.php
!tools/smarty*/cache/index.php
tools/smarty*/compile/*.php
!tools/smarty*/compile/index.php

themes/default/cache/*.js
themes/default/cache/*.css

# Ignore files on root directory
robots.txt
sitemap.xml
但git仍然跟踪缓存文件中的更改。 如何解决此问题?

gitignore中的条目仅适用于未跟踪的文件。您必须从存储库中删除这些文件。若要删除这些文件,请使用git rm-cached$file1。。。。这样,文件将从repo中删除,但仍保留在您的工作目录中。文件可能重复