Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Magento .gitignore example
######################
# Magento .gitignore #
######################
# Magento Core unnecessary files #
##################################
/errors/local.xml
/index.php
/install.php
/mage
/php.ini
/php.ini.sample
downloader/*
includes/*
pkginfo/*
/PATCH*
# Maintenance flag #
####################
maintenance.flag
# Env, configuration and setup related files #
##############################################
/.htaccess
app/etc/local.xml
# var, and static assets #
##########################
media/*
!/media/.htaccess
!/media/customer/
!/media/customer/.htaccess
!/media/downloadable/
!/media/downloadable/.htaccess
var/*
!var/.htaccess
# Magmi files #
###############
/magmi/state/*
!/magmi/state/dummy.txt
/magmi/conf/magmi.ini
# Do not version CSV data source configurations, as file paths are instance dependents
/magmi/conf/Magmi_CSVDataSource.conf
/magmi/conf/*/Magmi_CSVDataSource.conf
# IDE files #
#############
.project
.idea/*
.buildpath
.settings
# System files #
################
.*~
*~
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# Redis dump #
##############
dump.rdb
# Sass files #
##############
**/.sass-cache/
# Node and node-related files #
###############################
gulpfile.js
node_modules/*
# Project specific files #
##########################
_utils/bdd/*
_utils/_gitignored/*
/feeds
/*.tar
/*.bz2
/*.rdb
/*.xml
nohup.out
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.swp
/.buildpath
/.cache
/.metadata
/.project
/.settings
atlassian*
/nbproject
/sitemap
/.idea
/.gitattributes
node_modules
/app/code/Magento
/app/design/*/Magento
/app/etc
/app/i18n/magento
/app/*.*
/bin
/dev/shell
/dev/tests/*/framework
/dev/tests/*/testsuite/Magento
/dev/tests/*/tmp
/dev/tests/*/etc
/dev/tests/*/*.*
/dev/tests/*.*
/dev/tests/api-functional/config
/dev/tests/api-functional/_files/Magento
/dev/tests/js/JsTestDriver/framework
/dev/tests/js/JsTestDriver/testsuite/lib
/dev/tests/js/JsTestDriver/testsuite/mage
/dev/tests/js/JsTestDriver/*.*
/dev/tests/js/jasmine/assets
/dev/tests/js/jasmine/spec_runner
/dev/tests/js/jasmine/tests/app/code/Magento
/dev/tests/js/jasmine/tests/lib/mage
/dev/tests/js/jasmine/*.*
/dev/tests/performance
/dev/tests/functional/lib/Magento
/dev/tests/functional/tests/app/Magento
/dev/tests/functional/testsuites/Magento
/dev/tests/functional/utils
/dev/tools/Magento
/dev/tools/grunt
/dev/tools/*.*
/dev/*.*
!/dev/soon_appjs
/generated
/lib
/pub
/setup
/var
/vendor
/update
/phpserver
**/node_modules/
npm-debug.log
.DS_Store
.DS_Store?
/*.*
!/.gitignore
!/composer.json
!/composer.lock
!/README.md
@antoinekociuba

This comment has been minimized.

Copy link

@antoinekociuba antoinekociuba commented Sep 1, 2014

Can you add the following, under # System files # section:

*.swp

Thx

@antoinekociuba

This comment has been minimized.

Copy link

@antoinekociuba antoinekociuba commented Oct 27, 2014

Any reason of ignoring app/etc/config.xml file?

In my opinion, it should be versionned as it doesn't contain any sensitive data. It also makes people really confused when they deploy the projet and get some obscure error messages. To be discussed :p.

@Juli0s

This comment has been minimized.

Copy link

@Juli0s Juli0s commented Nov 28, 2014

Can you add the maintenance.flag file in the section "Magento Core unnecessary files" ?

Thx

@antoinekociuba

This comment has been minimized.

Copy link

@antoinekociuba antoinekociuba commented Jun 2, 2016

Hervé, could you modify the Magmi part with the following please (tested and approved ;p) :

# Magmi files #
###############
/magmi/state/*
!/magmi/state/dummy.txt
/magmi/conf/magmi.ini
# Do not version CSV data source configurations, as file paths are instance dependents
/magmi/conf/Magmi_CSVDataSource.conf
/magmi/conf/*/Magmi_CSVDataSource.conf

Thx

@antoinekociuba

This comment has been minimized.

Copy link

@antoinekociuba antoinekociuba commented Jul 27, 2016

Up for Magmi Hervé? :)

@antoinekociuba

This comment has been minimized.

Copy link

@antoinekociuba antoinekociuba commented Apr 25, 2017

/dev/travis/. on M2 .gitignore is missing on line https://gist.github.com/herveguetin/6436362#file-gitignore_magento2-L50 (have seen files in it on 2.1.5 and 2.1.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment