To configure your gitlab repository, you must follow the following steps
The .gitignore
Retrieve the .gitignore
The PS Hosting environment comes with the official PrestaShop .gitignore.
If this is not the case you can retrieve the correct version.
Retrieve the .gitignore for the correct version of PrestaShop:
Remember to replace [PS_VERSION] with the version of your PrestaShop
https://raw.githubusercontent.com/PrestaShop/PrestaShop/[PS_VERSION]/.gitignore
Ex for version 8.1.0
https://raw.githubusercontent.com/PrestaShop/PrestaShop/8.1.0/.gitignore
Modify the “admin-dev” with the correct folder of your PS admin
You need to search in the .gitignore all the lines with "admin-dev" and replace them with the real admin folder of your current PrestaShop.
Add lines specific to PrestaShop Hosting
Add the following lines after (change values between [__])
#PS HOSTING
/.no-file-watch
!/robots.txt
!/composer.lock
/*.xml
!/[ADMIN_DIRECTORY]/themes/default/public/*
!/[ADMIN_DIRECTORY]/themes/new-theme/public/*
!/bin/
!/app/Resources/translations/*
!/config/themes/*
!/mails/*
The ADMIN_DIRECTORY is the name of the folder of your current PrestaShop BO
If you have a Wordpress blog:
# Blog
/[BLOG_DIRECTORY]/*
!/[BLOG_DIRECTORY]/wp-content/
/[BLOG_DIRECTORY]/wp-content/*
!/[BLOG_DIRECTORY]/wp-content/themes
/[BLOG_DIRECTORY]/wp-content/twenty*
!/[BLOG_DIRECTORY]/wp-content/plugins/
/[BLOG_DIRECTORY]/wp-content/plugins/*
The BLOG_DIRECTORY corresponding to the folder which contains the blog in your PrestaShop/
Ex: If your blog is in a folder called "blog" you will put:
# Blog
/blog/*
!/blog/wp-content/
/blog/wp-content/*
!/blog/wp-content/themes
/blog/wp-content/twenty*
!/blog/wp-content/plugins/
/blog/wp-content/plugins/*
Push to git
Then push your new .gitignore to git with or without the other modifications detected as usual. Or modify directly on GitLab
Comments
0 comments
Article is closed for comments.