Skip to content
framework29 active rulesVerified 2026-09-30

Magento .gitignore Template

Standard Magento gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Preconfigured with Magento
Search for templates
Quick add:
Selected1
Magento
Selected Templates (1)
.gitignore
29 rules
### Magento ###
#--------------------------#
# Magento Default Files #
#--------------------------#
/PATCH_*.sh
/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
46 lines•UTF-8
Deterministic

Raw Magento .gitignore

Crawlable upstream source template
magento.gitignore•46 lines•UTF-8
#--------------------------#
# Magento Default Files #
#--------------------------#
/PATCH_*.sh
/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

Key Pattern Breakdown

Core Ignored Rules

Primary upstream ignore rules defined for this technology.

/PATCH_*.sh/app/etc/local.xml/media/*!/media/.htaccess!/media/customer/media/customer/*+2 more

Source & Verification

License: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.