I'm new to Magento. I would like to create and design my online Marketplace by using Magento2. I installed and configured two servers with Magento 2.4 (Community Edition), the first server is a test server and the second is for the productive server.

I am planning to buy some extensions from a developer company. First, I would like to connect my Magento test server with Github, to give this company access to customize the extensions for me. After that, I would like to connect the productive server to Github so I can push the customized extensions from the test to the productive server.

Is there any documentation or video (step by step for beginners) to help me to do the following?

  1. How can I integrate the Magento2 server with Github?
  2. Which Magento folders or files should be added to the gitignore file in Github?
  3. How can I push the new customized codes (extensions) from the test to the productive server?

Thanks for your help.

1 Answer 1


For the most part, I recommend to use composer. In short: you declare your extensions (and also github repositories) in a file. When you then run composer, it will install/uninstall/update those extensions from the repositories given in that file.

Actually, there are 2 composer files. One file for declaring the allowed versions of extensions and another file, where the installed versions are declared.

So, if you would run composer update, composer will automatically install the latest version of the extensions and handle dependency issues.

If you are not programming your own extensions, it would be enough to handle those 2 files with github, to reproduce a magento installation with all its addons.

You can find composer here: https://getcomposer.org/ And more infos on the difference between the 2 composer files and the difference between composer update and composer install: https://medium.com/@favoriabs/composer-install-vs-composer-update-3737357c35a7

  • Thans for your answer Mairo. Is there any documentation or video (step by step for beginners)? to help me for doing that. Nov 23, 2020 at 9:52
  • I guess, this would be a good starting point: devdocs.magento.com/guides/v2.4/extension-dev-guide/package/… and of course, there are many videos on youtube. I just searched for "magento composer" and a ton of videos showed up...
    – Mario
    Nov 23, 2020 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.