Git Product home page Git Product logo

magento-2-repository-example's Introduction

Magento 2 Repository Example

This Magento 2 Repository Example is a starting point of all Magento 2 custom projects. It contains only necessary files, the files which are required for creating and extracting Magento 2 project on a server or a local environment.

It only includes 3 required files:

  • .gitignore
  • composer.json
  • composer.lock

In addition to this, if running with Apache2 server, .htaccess files are also included into the repository. It can be necessary for the Content Delivery Network (CDN) custom configuration or PHP settings modifications, for example memory_limit.

  • pub/.htaccess
  • pub/media/.htaccess
  • pub/static/.htaccess

That's it!

The .gitignore file

The .gitignore file is modified in order to eliminate all unnecessary files from the repository. Here are additional changes for the .gitignore file: Copy these lines to your Magento 2 project's .gitignore file.

/.modman/
/app/*
/bin/*
/dev/*
/bin/*
/lib/*
/phpserver/*
/setup/*
/update/*
/.github/*
/pub/.user.ini
/pub/cron.php
/pub/get.php
/pub/health_check.php
/pub/index.php
/pub/static.php
/pub/opt/magento/var/resource_config.json
/pub/errors/*
/.htaccess
/.htaccess.sample
/.php_cs.dist
/.travis.yml
/.user.ini
/auth.json.sample
/CHANGELOG.md
/COPYING.txt
/grunt-config.json.sample
/Gruntfile.js.sample
/index.php
/LICENSE.txt
/LICENSE_AFL.txt
/nginx.conf.sample
/package.json.sample
/php.ini.sample

Also, there are some modifications in the .gitignore file for existing lines, please see commit for a better understanding. Or simply add the following lines at the end of the .gitignore file.

#!/pub/media/attribute/.htaccess
#!/pub/media/catalog/.htaccess
#!/pub/media/customer/.htaccess
#!/pub/media/downloadable/.htaccess
#!/pub/media/import/.htaccess
#!/pub/media/theme_customization/.htaccess
#!/pub/media/wysiwyg/.htaccess
#!/pub/media/tmp/.htaccess
#!/var/.htaccess
#!/vendor/.htaccess
#!/generated/.htaccess

magento-2-repository-example's People

Contributors

mcspronko avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.