Laravel和PHPStorm项目的gitignore中包括什么? [英] What to include in gitignore for a Laravel and PHPStorm project?
问题描述
我将与一个使用Laravel和PHPStorm的项目进行协作.在进行了一些研究并研究了一些项目之后,这是我到目前为止提出的.gitignore
.
I'm going to be collaborating on a project using Laravel and PHPStorm. After doing some research and working on a few projects, here is the .gitignore
I've come up with so far.
/bootstrap/compiled.php
/vendor
/node_modules
composer.phar
composer.lock
.env.*.php
.env.php
.DS_Store
workspace.xml
Thumbs.db
我是否还有其他可能导致冲突的文件被忽略?
Are there any other files that I might be overlooking that could cause conflicts?
对于任何想知道为什么Flosculus评论存在的人,我最初发帖说我在git历史记录中显示.idea/workspace文件时遇到问题,他的答案是如何删除它.
For anyone wondering why Flosculus comment is there, I originally posted that I was having issues with the .idea/workspace file showing up in my git history, and his answer is how to remove it.
推荐答案
除非PHPStorm是项目的正式组成部分(例如,它是由公司委托或得到所有团队成员同意的),否则我建议您将其忽略设置放入.git/info/exclude
而不是.gitignore
.前者在您的副本本地,后者应被提交并共享.
Unless PHPStorm is an official part of the project (e.g. it's mandated by a company, or agreed to by all team members) I would urge you to put its ignore settings into .git/info/exclude
instead of .gitignore
. The former is local to your copy, the latter should be committed and shared.
# Created by https://www.gitignore.io/api/phpstorm
### 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
# Sensitive or high-churn files:
.idea/**/dataSources/
.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
### PhpStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
顺便说一句,可以通过命令行访问像
As an aside, gitignore.io can be accessed via the command-line, so you can do things like
gi laravel,phpstorm >> .gitignore
这是一个非常方便的小工具.
It's a pretty handy little tool.
这篇关于Laravel和PHPStorm项目的gitignore中包括什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!