在團隊開發中使用git來進行版本控制,常常要根據項目的內容來對.gitignore來進行配置
這方面我們可以參考https://github.com/github/gitignore來進行配置
vendor/
node_modules/
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
bootstrap/cache/
.env.*.php
.env.php
.env
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/
對于laravel來說,因為國內的composer下載速度很慢,所以可以將vendor/和node_modules保留下來,不列入忽略
對于使用phpstorm來進行開發的小伙伴來說,一定有被.idea里面頻繁更新的文件搞得不勝其煩的經歷,所以在項目開始之前,一定記住要把.idea/*文件下所有的文件給排除
其實https://github.com/github/gitignore中Global部分也對phpstorm軟件做出了一下的推薦:
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.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
fabric.properties
如果有需要更精細配置的,也許可以參考以上內容