Skip to content

Commit 1e00aee

Browse files
author
Hannes Elvemyr
committed
Fixes issue excluding sub directories
This .gitignore is not correct. At least was not working for me. Ignoring /media/* and then excluding !/media/customer/.htaccess is not working. According to the Git manual, "It is not possible to re-include a file if a parent directory of that file is excluded." (https://git-scm.com/docs/gitignore). Found a solution here: http://stackoverflow.com/questions/987142/make-gitignore-ignore-everything-except-a-few-files/16318111#16318111
1 parent 1489551 commit 1e00aee

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Magento.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,41 @@
33
#--------------------------#
44

55
/app/etc/local.xml
6+
67
/media/*
78
!/media/.htaccess
9+
10+
!/media/customer
11+
/media/customer/*
812
!/media/customer/.htaccess
13+
14+
!/media/dhl
15+
/media/dhl/*
916
!/media/dhl/logo.jpg
17+
18+
!/media/downloadable
19+
/media/downloadable/*
1020
!/media/downloadable/.htaccess
21+
22+
!/media/xmlconnect
23+
/media/xmlconnect/*
24+
25+
!/media/xmlconnect/custom
26+
/media/xmlconnect/custom/*
1127
!/media/xmlconnect/custom/ok.gif
28+
29+
!/media/xmlconnect/original
30+
/media/xmlconnect/original/*
1231
!/media/xmlconnect/original/ok.gif
32+
33+
!/media/xmlconnect/system
34+
/media/xmlconnect/system/*
1335
!/media/xmlconnect/system/ok.gif
36+
1437
/var/*
1538
!/var/.htaccess
39+
40+
!/var/package
41+
/var/package/*
1642
!/var/package/*.xml
43+

0 commit comments

Comments
 (0)