如何为 prestashop 1.7 创建 .gitignore 文件
How to create the .gitignore file for prestashop 1.7
我想知道如何为 Prestashop 1.7 创建 .gitignore 文件,以便能够为开发环境提供良好的代码版本,并使其在生产环境中做好准备。
这个.gitignore我用了很多:
# Private files
# The following files contain your database credentials and other personal data.
config/settings.*.php
# Cache, temp and generated files
# The following files are generated by PrestaShop.
admin-dev/autoupgrade/
/cache/*
!/cache/index.php
!/cache/*/
/cache/*/*
!/cache/cachefs/index.php
!/cache/purifier/index.php
!/cache/push/index.php
!/cache/sandbox/index.php
!/cache/smarty/index.php
!/cache/tcpdf/index.php
config/xml/*.xml
/log/*
*sitemap.xml
themes/*/cache/
modules/*/config*.xml
# Site content
# The following folders contain product images, virtual products, CSV's, etc.
admin-dev/backups/
admin-dev/export/
admin-dev/import/
download/
/img/*
upload/
# Also, I add this when I'm creating themes or modules
node_modules/
# And to be sure
.sass-cache/
# Code Editors
.vscode/
.idea/
.DS_Store
.DS_Store/
我直接从 Github's gitignore 模板存储库中获取它。
此外,您应该查看有关制作模块或主题的文档 here。
这是我见过的最完整的 Prestashop 1.7 .gitignore 文件。
如果它有任何缺陷,它们与条目太多有关,但这不是问题:)
来源:https://gist.github.com/prestarocket/7870db5cbba8b841faf08563e11c0249
# Cache, temp and personal files
/.htaccess
*.log
npm-debug.log.*
.sass-cache/
/cache/*
download/*
/img/*
/log/*
/upload/*
vendor/*
docs/phpdoc-sf/
composer.lock
tests/Selenium/errorShots/
tests/Selenium/errorDumps/
/admin*/autoupgrade/*
/admin*/backups/*
/admin*/import/*
/admin*/import/*
!/admin*/import/.htaccess
!/admin*/import/index.php
themes/*/cache/*
# Config
config/settings.inc.php
config/settings.old.php
config/xml/*
config/themes/*
!config/xml/themes/default.xml
tests/Selenium/settings.js
themes/*/config/settings_*.json
app/config/parameters.old.yml
app/config/config.php
# Themes, modules and overrides
!modules/*
modules/config_*.xml
modules/ps_imageslider/images/*
!modules/ps_imageslider/images/index.php
modules/ps_banner/img/*
!modules/ps_banner/img/index.php
!override/*
/themes/StarterTheme
# Vendors and dependencies
bower_components/
node_modules/
composer.phar
php-cs-fixer
.grunt/*
# Translations and emails templates
translations/*
mails/*
!mails/fr/
themes/default-bootstrap/lang/*
themes/default-bootstrap/modules/*/translations/*.php
themes/default-bootstrap/mails/*
!themes/default-bootstrap/mails/fr/
themes/default-bootstrap/modules/*/mails/*
!themes/default-bootstrap/modules/*/mails/fr
# MISC
*sitemap.xml
/robots.txt
# Symfony
/app/bootstrap.php.cache
/app/cache/*
!app/cache/.gitkeep
/app/Resources/translations/*
!/app/Resources/translations/default
/app/test/cache/*
!app/test/cache/.gitkeep
/app/config/parameters.yml
/app/config/parameters.php
/app/logs/*
!app/logs/.gitkeep
/app/phpunit.xml
/bin/
/web/bundles/
/web/css/
/web/js/
# Created by https://www.gitignore.io/api/linux,osx,windows,sublimetext,phpstorm
### Linux ###
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
### Eclipse ###
.buildpath
.project
.settings/
.externalToolBuilders/
希望对您有所帮助。
我想知道如何为 Prestashop 1.7 创建 .gitignore 文件,以便能够为开发环境提供良好的代码版本,并使其在生产环境中做好准备。
这个.gitignore我用了很多:
# Private files
# The following files contain your database credentials and other personal data.
config/settings.*.php
# Cache, temp and generated files
# The following files are generated by PrestaShop.
admin-dev/autoupgrade/
/cache/*
!/cache/index.php
!/cache/*/
/cache/*/*
!/cache/cachefs/index.php
!/cache/purifier/index.php
!/cache/push/index.php
!/cache/sandbox/index.php
!/cache/smarty/index.php
!/cache/tcpdf/index.php
config/xml/*.xml
/log/*
*sitemap.xml
themes/*/cache/
modules/*/config*.xml
# Site content
# The following folders contain product images, virtual products, CSV's, etc.
admin-dev/backups/
admin-dev/export/
admin-dev/import/
download/
/img/*
upload/
# Also, I add this when I'm creating themes or modules
node_modules/
# And to be sure
.sass-cache/
# Code Editors
.vscode/
.idea/
.DS_Store
.DS_Store/
我直接从 Github's gitignore 模板存储库中获取它。
此外,您应该查看有关制作模块或主题的文档 here。
这是我见过的最完整的 Prestashop 1.7 .gitignore 文件。 如果它有任何缺陷,它们与条目太多有关,但这不是问题:)
来源:https://gist.github.com/prestarocket/7870db5cbba8b841faf08563e11c0249
# Cache, temp and personal files
/.htaccess
*.log
npm-debug.log.*
.sass-cache/
/cache/*
download/*
/img/*
/log/*
/upload/*
vendor/*
docs/phpdoc-sf/
composer.lock
tests/Selenium/errorShots/
tests/Selenium/errorDumps/
/admin*/autoupgrade/*
/admin*/backups/*
/admin*/import/*
/admin*/import/*
!/admin*/import/.htaccess
!/admin*/import/index.php
themes/*/cache/*
# Config
config/settings.inc.php
config/settings.old.php
config/xml/*
config/themes/*
!config/xml/themes/default.xml
tests/Selenium/settings.js
themes/*/config/settings_*.json
app/config/parameters.old.yml
app/config/config.php
# Themes, modules and overrides
!modules/*
modules/config_*.xml
modules/ps_imageslider/images/*
!modules/ps_imageslider/images/index.php
modules/ps_banner/img/*
!modules/ps_banner/img/index.php
!override/*
/themes/StarterTheme
# Vendors and dependencies
bower_components/
node_modules/
composer.phar
php-cs-fixer
.grunt/*
# Translations and emails templates
translations/*
mails/*
!mails/fr/
themes/default-bootstrap/lang/*
themes/default-bootstrap/modules/*/translations/*.php
themes/default-bootstrap/mails/*
!themes/default-bootstrap/mails/fr/
themes/default-bootstrap/modules/*/mails/*
!themes/default-bootstrap/modules/*/mails/fr
# MISC
*sitemap.xml
/robots.txt
# Symfony
/app/bootstrap.php.cache
/app/cache/*
!app/cache/.gitkeep
/app/Resources/translations/*
!/app/Resources/translations/default
/app/test/cache/*
!app/test/cache/.gitkeep
/app/config/parameters.yml
/app/config/parameters.php
/app/logs/*
!app/logs/.gitkeep
/app/phpunit.xml
/bin/
/web/bundles/
/web/css/
/web/js/
# Created by https://www.gitignore.io/api/linux,osx,windows,sublimetext,phpstorm
### Linux ###
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
### Eclipse ###
.buildpath
.project
.settings/
.externalToolBuilders/
希望对您有所帮助。