Registration and creation of vendors in the Marketplace
The Marketplace is a platform that helps us connect sellers and buyers, that several companies can publish their products and start selling them.
When creating a Magento 2 instance, there are many folders and files in the installation directory, this guide can help you understand which files should be added to your project's repository and which ones are not needed or could even be problematic to include.
Efficient Magento 2 development requires not only good programming practices, but also proper version control management and collaborative workflows. One of the most effective tools to achieve this is GitHub, a platform that allows you to manage code, track changes and maintain order in complex projects. Having a well-organized repository is essential to ensure scalability, clarity and team productivity when working with Magento-based solutions.
Magento 2 projects often include multiple modules, custom themes, third-party extensions and configuration files, which can make management difficult if there is no clear repository structure. Defining conventions for branches, pull requests and documentation allows development teams to work in a more orderly fashion and avoid unnecessary conflicts.
This article presents best practices for organizing a GitHub repository in Magento 2 projects, addressing folder structure, branching strategies, and documentation recommendations. Implementing a consistent and scalable repository organization facilitates collaboration, minimizes errors, and ensures high code quality throughout the project lifecycle.
It will also explain in broad terms how the Magento filesystem works and what recommendations are used to optimize your repository. For an ideal understanding of this article, it is recommended to have a basic understanding of Git and GitHub (or some equivalent tool like GitLab or BitBucket), however the concepts below are useful for anyone who wants to learn about files and folders in a Magento 2 project.
First of all, let's list the default Magento 2.4 repository:
The above files must always be included in our repository, but in addition, the following files or directories may also be included:
Files and folders to avoid adding to the repository (must be in the .gitignore file):
Finally, the following recommendations can make it easier to manage the code and resources of the repository and avoid errors:
I hope this article has been useful to understand how to organize a GitHub repository in Magento 2, remember that all projects are different and there are no definitive rules of what you can add and what not, however if you apply the concepts explained above, you can avoid various problems on the way and work more orderly and safely.
GET FREQUENTLY ASKED QUESTIONS
The Marketplace is a platform that helps us connect sellers and buyers, that several companies can publish their products and start selling them.
Pricing rules help to attract new customers to our site by encouraging them to buy our products.
Magento is a very robust platform that has different modules, adaptable to industries such as retail, insurance, hotel sector, even for the financial...