1

I am pushing a magento 2 project on github but confused about the folders and files which i should not upload in first upload.I add a gitignore file, should i do not upload those files which are mentioned in .gitignore.Please guide.

3 Answers 3

0

Magento has already manage .gitignor file in root directory very well

My just suggestion is add /app/etc/config.php this path in your .gitignor file

Rest is fine in my opinion

0

If everything you done is under a custom module you should only upload the fils/folder under your module or modules if you have more then one:

In my case I only upload the following folders app\code -> Where my custom modules are app\design -> Where my custom theme is

My .gitignore looks like this

/auth.json
/auth.json.sample
/bin
/CHANGELOG.md
/dev
/generated
/grunt-config.json.sample
/Gruntfile.js.sample
/index.php
/inf.php
/lib
/LICENSE.txt
/LICENSE_AFL.txt
/nginx.conf.sample
/observer
/package.json.sample
/phpserver
/pub
/update
/var
/vendor
0
/.buildpath
/.cache
/.metadata
/.project
/.settings
/.vscode
atlassian*
/nbproject
/robots.txt
/pub/robots.txt
/sitemap
/sitemap.xml
/pub/sitemap*
/pub/sitemap-1-1.xml
/pub/sitemap.xml
/pub/sitemap-1-2.xml
/pub/sitemap-1-3.xml
/pub/sitemapfr-2-1.xml
/pub/sitemapfr-2-2.xml
/pub/sitemapfr-2-3.xml
/pub/sitemapfr.xml
/.idea
/.gitattributes
/app/config_sandbox
/app/etc/env.php
/app/code/Magento/TestModule*
/lib/internal/flex/uploader/.actionScriptProperties
/lib/internal/flex/uploader/.flexProperties
/lib/internal/flex/uploader/.project
/lib/internal/flex/uploader/.settings
/lib/internal/flex/varien/.actionScriptProperties
/lib/internal/flex/varien/.flexLibProperties
/lib/internal/flex/varien/.project
/lib/internal/flex/varien/.settings
/node_modules
/.grunt
/Gruntfile.js
/package.json
/.php_cs
/.php_cs.cache
/grunt-config.json
/pub/media/*.*
!/pub/media/.htaccess
/pub/media/attribute/*
!/pub/media/attribute/.htaccess
/pub/media/analytics/*
/pub/media/catalog/*
!/pub/media/catalog/.htaccess
/pub/media/customer/*
!/pub/media/customer/.htaccess
/pub/media/downloadable/*
!/pub/media/downloadable/.htaccess
/pub/media/favicon/*
/pub/media/import/*
!/pub/media/import/.htaccess
/pub/media/logo/*
/pub/media/custom_options/*
!/pub/media/custom_options/.htaccess
/pub/media/theme/*
/pub/media/theme_customization/*
!/pub/media/theme_customization/.htaccess
/pub/media/blog/*
/pub/media/amasty/*
/pub/media/impotexport/*
/pub/media/wysiwyg/*
!/pub/media/wysiwyg/.htaccess
/pub/media/tmp/*
!/pub/media/tmp/.htaccess
/pub/media/captcha/*
/pub/static/*
!/pub/static/.htaccess

/var/*
!/var/.htaccess
/vendor/*
!/vendor/.htaccess
/generated/*
!/generated/.htaccess
.DS_Store
/.editorconfig
/.htaccess
/.htaccess.sample
/.php-cs-fixer.dist.php
/.user.ini
/CHANGELOG.md
/COPYING.txt
/Gruntfile.js.sample
/LICENSE.txt
/LICENSE_AFL.txt
/SECURITY.md
/auth.json.sample
/bin/*
/composer.lock
/dev/*
/grunt-config.json.sample
/lib/*
/nginx.conf.sample
/package.json.sample
/phpserver/*
/setup/*
/pub/media/*

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.