diff options
author | Hannes Elvemyr <git@elvemyrconsulting.se> | 2017-03-09 11:31:19 +0100 |
---|---|---|
committer | Hannes Elvemyr <git@elvemyrconsulting.se> | 2017-03-09 11:31:19 +0100 |
commit | 1e00aee3b15595ddaa35847e0b0882d839c4007e (patch) | |
tree | 8a30c962a7a29e58c3a804daf862a9919c0d26d9 | |
parent | 1489551937b44864d07b87891ab95af439634e02 (diff) | |
download | gitignore-1e00aee3b15595ddaa35847e0b0882d839c4007e.tar.gz gitignore-1e00aee3b15595ddaa35847e0b0882d839c4007e.zip |
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
-rw-r--r-- | Magento.gitignore | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Magento.gitignore b/Magento.gitignore index b282f5cf..6f1fa223 100644 --- a/Magento.gitignore +++ b/Magento.gitignore @@ -3,14 +3,41 @@ #--------------------------# /app/etc/local.xml + /media/* !/media/.htaccess + +!/media/customer +/media/customer/* !/media/customer/.htaccess + +!/media/dhl +/media/dhl/* !/media/dhl/logo.jpg + +!/media/downloadable +/media/downloadable/* !/media/downloadable/.htaccess + +!/media/xmlconnect +/media/xmlconnect/* + +!/media/xmlconnect/custom +/media/xmlconnect/custom/* !/media/xmlconnect/custom/ok.gif + +!/media/xmlconnect/original +/media/xmlconnect/original/* !/media/xmlconnect/original/ok.gif + +!/media/xmlconnect/system +/media/xmlconnect/system/* !/media/xmlconnect/system/ok.gif + /var/* !/var/.htaccess + +!/var/package +/var/package/* !/var/package/*.xml + |