What you miss when you don't migrate in time
If your store still runs Magento 2.3, you are missing security patches, current infrastructure support and the checkout and search improvements that...
By Role
By Industry
By Target Customer
What We Offer
ICX helps companies grow revenue and profitability by connecting customer experience, sales, pricing, CRM and automation into one commercial system.
Customer Experience
We design memorable, customer-centered experiences that drive loyalty, enhance support, and optimize every stage of the journey. From maturity frameworks and experience maps to loyalty programs, service design, and feedback analysis, we help brands deeply connect with users and grow sustainably.
Marketing & Sales
We drive marketing and sales strategies that combine technology, creativity, and analytics to accelerate growth. From value proposition design and AI-driven automation to inbound, ABM, and sales enablement strategies, we help businesses attract, convert, and retain customers effectively and profitably.
Pricing & Revenue
We optimize pricing and revenue through data-driven strategies and integrated planning. From profitability modeling and margin analysis to demand management and sales forecasting, we help maximize financial performance and business competitiveness.
Digital Transformation
We accelerate digital transformation by aligning strategy, processes and technology. From operating model definition and intelligent automation to CRM implementation, artificial intelligence and digital channels, we help organizations adapt, scale and lead in changing and competitive environments.
Operational Efficiency
We enhance operational efficiency through process optimization, intelligent automation, and cost control. From cost reduction strategies and process redesign to RPA and value analysis, we help businesses boost productivity, agility, and sustainable profitability.
Customer Experience
Marketing & Sales
Pricing & Revenue
Digital Transformation
Operational Efficiency
8 min read
Christopher Liddell | May 29, 2025
8 min read
Christopher Liddell | May 29, 2025
To organize a Magento 2 repository on GitHub, commit only what your team owns and can rebuild from, namely composer.json and composer.lock, the shared configuration in app/etc/config.php, custom modules, themes and server directives. Leave out everything Composer or the build generates, plus credentials and media. Then protect your main branches and release through reviewed pull requests.
This sounds like a developer concern, and the details are. The consequences are not. For any company that sells through Adobe Commerce, formerly Magento Commerce, the repository is where the store's revenue engine lives. A disorganized repository means slower releases, risky deployments during peak season, credentials exposed to people who should not have them, and a store that only one developer or one agency truly understands. A well-organized one means faster improvements to the customer experience, safer changes and real ownership of a strategic asset.
Every promotion, checkout improvement, integration and security patch passes through the repository before it reaches customers. Its structure determines how quickly and safely the business can change the store.
Research by DORA, the DevOps Research and Assessment program, measures software delivery with a small set of metrics, including deployment frequency, change lead time, change fail rate and failed deployment recovery time. Its guide to the software delivery metrics highlights a finding that matters to any commerce leader. Speed and stability are not trade-offs, and the best teams do well on both. Clean version control is one of the foundations of that performance.
In practical terms, a well-organized repository gives leadership four things.
There is also a commercial angle that is easy to overlook. When an implementation partner keeps the only working copy of the code, or when the repository cannot be understood without its original authors, the company loses negotiating power and pays for it in every future change. A clean, company-owned repository keeps that leverage where it belongs.
Many older guides were written for Magento 2.4.x releases that are no longer current. According to Adobe's released versions page, the current general availability release line is Adobe Commerce 2.4.9, released in May 2026 with regular support through May 2029, while 2.4.8 and 2.4.7 continue to receive security patches with earlier end-of-support dates. The repository structure described below applies across the 2.4 line. What matters for leadership is the support calendar. A store running an unsupported version accumulates security and compliance risk, and its repository should make upgrades routine rather than exceptional.
Our guide to Magento migration and version upgrades covers how to plan that process.
A default Adobe Commerce or Magento Open Source installation contains many folders. The image below shows a typical project root. Only part of it should be versioned.

| Path | Commit to the repository? | Why |
|---|---|---|
| composer.json | Yes | Declares the project's modules, extensions and dependencies |
| composer.lock | Yes | Pins the exact versions installed so every environment is identical |
| .gitignore | Yes | Defines what Git must never track |
| app/etc/config.php | Yes | Shared configuration, such as enabled modules and exported settings |
| app/etc/env.php | No | System-specific and sensitive settings, including database credentials |
| app/code | Yes | Custom modules not installed through Composer |
| app/design | Yes | Custom storefront and Admin themes |
| app/i18n | Yes, if used | Custom language packages |
| .htaccess files in the root and pub folders | Yes | Server directives the application needs |
| vendor | No | Installed by Composer from composer.lock |
| generated | No | Created automatically during compilation |
| pub/static | No, except .htaccess | Generated by static content deployment |
| pub/media | No | Catalog images and uploads, better kept in managed storage with backups |
| var | No | Cache, logs, reports and temporary files |
| auth.json | No | Composer access keys for private package repositories |
The most important distinction is inside app/etc. Adobe's documentation on deployment configuration states that the shared configuration in app/etc/config.php should be in source control, while the system-specific configuration in app/etc/env.php should not, because it holds settings unique to each environment and sensitive values. Sensitive settings can be managed through environment variables or the dedicated command for sensitive configuration. Older advice to commit the entire app/etc folder to a private repository is no longer good practice. A private repository still has many readers, and credentials should never depend on who has access to code.
The vendor directory is fully determined by composer.json and composer.lock. Committing it inflates the repository, hides real changes inside thousands of third-party files and invites manual edits that the next upgrade will silently overwrite. The same logic applies to generated, pub/static and var. Anything the build can recreate should be recreated by the build. The var folder can be worth backing up, but its contents are large and volatile, so a dedicated storage service is a better home than Git. The lib folder holds libraries used by modules and components; it may occasionally need to be versioned, but when Composer orchestrates those libraries, as with vendor, the code itself does not need to be in the repository.
Magento Open Source ships with a base .gitignore file that already excludes most generated and environment-specific content. Use it as the starting point, review it after each upgrade and add project-specific rules, such as local IDE folders or deployment artifacts, rather than writing one from scratch. When a file on the ignore list genuinely needs to be versioned, the team should document why, so that the exception is a decision and not an accident.
Product images and downloadable files change constantly and can grow very large. Remote repositories such as GitHub also impose storage limits, so these files belong in managed storage with its own backup policy, such as AWS S3, Google Drive or Dropbox, not in Git. This also keeps the repository fast to clone, which matters every time a new developer or partner joins the project.
Structure is only half of the discipline. The other half is how changes move from a developer's laptop to production.
Complex branching strategies rarely survive contact with a busy commerce calendar. Most teams do well with a model that everyone can explain in a minute.
Every project is different, and there are no definitive rules about what must or must not be versioned. Applying the principles above, however, avoids most problems and lets the team work in a more orderly and secure way. The same discipline applies to everyday store configuration, from features such as configuring the wishlist in Magento to larger releases.
Whatever model the team chooses, the business should also agree on a release calendar. Freezing non-essential changes before peak sales periods, and scheduling upgrades in quieter weeks, protects revenue at the moments when it matters most.
Ask your technology lead or implementation partner to confirm these points. None requires a large project.
ICX Consulting is a commercial strategy and customer experience firm headquartered in Miami, serving companies in the United States and Latin America. We help leadership teams define what their digital commerce channel must achieve for revenue, customer experience and efficiency, and then implement it on Adobe Commerce through our B2B ecommerce consulting and implementation practice, with governance, security and delivery practices that keep the store under the client's control. Our article on essential cybersecurity for your store in Adobe Commerce complements this guide.
If you are evaluating who should build or maintain your store, we invite you to use the ICX Implementer Partner Selection Toolkit, which helps you compare partners on the criteria that protect your investment.
No. Adobe's documentation states that env.php holds system-specific configuration and should not be in source control, because it contains environment settings and sensitive values such as database credentials. Each environment should have its own env.php, with sensitive settings managed through environment variables or the sensitive configuration command, while config.php is shared through the repository.
Because composer.lock already guarantees that every environment installs exactly the same versions. Committing vendor makes the repository heavy, hides your real changes among third-party code and encourages direct edits that are lost on the next upgrade. Customizations belong in your own modules or in patches managed through Composer.
The principles are the same, but cloud projects add their own configuration files and a Git-based deployment workflow defined by Adobe. Teams on Adobe Commerce on cloud infrastructure should follow Adobe's cloud project structure for those files and apply the rules in this guide to custom code, credentials and generated content.
No. The same structure and rules work on GitLab, Bitbucket or Azure Repos, since they rely on Git itself and on how Adobe Commerce separates code, configuration and generated content. Branch protection, required reviews and automated checks exist on all major platforms, so the choice of service should follow the company's existing tools and security policies.
Often enough to stay within Adobe's support window and to apply security patches promptly. Teams with an organized repository, automated checks and consistent environments can treat upgrades as regular maintenance rather than a disruptive project, which lowers both risk and total cost over the life of the store.
A store that the business can change quickly and safely is a competitive advantage that customers feel in every visit. Want to know whether your store is built and governed to move at the speed of your business? Request a diagnostic with an ICX consultant.
If your store still runs Magento 2.3, you are missing security patches, current infrastructure support and the checkout and search improvements that...
Magento, today marketed by Adobe as Adobe Commerce, is a strong option for creating an online store because it combines search visibility,...
A Magento 2.4.2 migration guide is, at its core, a decision framework for an older Adobe Commerce release. Upgrading from earlier 2.x versions means...