Skip to content

Instantly share code, notes, and snippets.

@herveguetin
Last active October 24, 2019 09:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save herveguetin/6436362 to your computer and use it in GitHub Desktop.
Save herveguetin/6436362 to your computer and use it in GitHub Desktop.
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
@Juli0s
Copy link

Juli0s commented Nov 28, 2014

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

Thx

@antoinekociuba
Copy link

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
Copy link

Up for Magmi Hervé? :)

@antoinekociuba
Copy link

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