0

i'm currently working for prestashop theme and generate a lot of cache. MY repository looks like this:

/font
/psd (design)
/PRESTA 
 /goride (prestashop directory)
  /cache
  /config
  /mails
  /... (other prestashop folders and files)

I've added into /PRESTA/goride following .gtignore generated from gtignore.io:

# 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

But git still tracks changes in cache files. How can I Solve this problem?

Jarosław Rewers
  • 1,059
  • 3
  • 14
  • 23
  • 1
    Entries in `.gitignore` are working only for **untracked** files. You must remove them from repository. – user11153 Oct 31 '14 at 11:09
  • To delete the files use `git rm --cached $file1 ...`. This way the file gets removed from the repo but stays in your working directory. – Daniel Böhmer Oct 31 '14 at 11:16
  • possible duplicate of [Ignore files that have already been committed to a Git repository](http://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository) – rsanchez Oct 31 '14 at 12:36

0 Answers0