我有一个新的流星项目。 我猜.meteor
DIR有配置文件(需要)和临时文件的组合(不需要)。
那么什么是你.gitignore
?
我有一个新的流星项目。 我猜.meteor
DIR有配置文件(需要)和临时文件的组合(不需要)。
那么什么是你.gitignore
?
你想排除版本控制的唯一目录是.meteor/local
。
流星会自动创建正确的.meteor
和.meteor/.gitignore
,虽然-你不需要做任何事情。
你可能想要把所有的配置设置文件在那里,如果你正在推动公共回购。
我喜欢存储加密密钥和用于SMTP一样,Twitter,Facebook和其他服务在config.js各种密码的任何安全敏感数据的配置设置,然后把在的.gitignore或在信息/排除文件。 东西我不想在公共回购。
只是一个额外的建议,考虑为您的.gitignore
你gitignore也应包含以下内容:
公共/ node_modules
你有这个补充适当制作的package.json管理节点模块依赖安装。
这将需要安装一个新的地方时,NPM安装。
根据这篇文章 ,你应该忽略你的settings.json
,特别是如果你有环境的具体信息,包括API密钥。
一起来看流星1.3你也想忽略node_modules
。 没有理由让所有加入的Git库的,因为你可以通过NPM安装它们。 该node_modules
文件夹最有可能比你大的应用程序(不包括.meteor/local
文件夹)
流星创建.gitignore
在.meteor
默认目录。
然而,您的项目.gitignore
应排除任何敏感数据的配置文件和node_modules
。
如果你使用
.idea
文件夹 sublime-project
sublime-workspace
如果你是Mac用户,你可以忽略DS_Store
并且如果您使用NPM忽略npm
原因,如果在同一个项目在Windows和Mac用户的工作,因为相同的NPM版本是Mac和Windows不同的是显示错误。
以下是我与Webstorm和部署Mupx流星1.4使用。
# Meteor files to ignore now handled by .ignore file within .Meteor folder automatically
# settings file to ignore to protect API keys
settings.json
# MUP / MUPX file to ignore to protect server passwords and sensitive info.
mup.json
# npm package files to ignore
node?modules/
npm-debug.log
# Webstorm IDE files to ignore
.idea/*
# Typing type definition files to ignore. Webstorm uses type definitions for autocomplete even without typescript
typings/*
我们用这个gitignore,这englobes许多IDE和流星,以及系统文件等。
### WebStorm ###
.idea/
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# 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 shortcuts
*.lnk
### Linux ###
*~
# KDE directory preferences
.directory
### 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
### Node/NPM ###
node_modules
npm-debug.log
### Development ###
dump
mochawesome-reports
ngrok
你需要把它位于根目录下安装的软件包目录中名为node_modules。 而当你提交的项目会被忽略。 同时产品经理可以在自己的服务器中使用的package.json容易安装软件包。
### MeteorJS ###
# default meteor build and local packages
.meteor/local
# meteor settings file
settings.json
# meteor build output files
*.tar.gz
# general swp files from vim
*.swp
# End of https://www.gitignore.io/api/meteorjs
这是我与的IntelliJ使用的.gitignore文件:
node_modules/
.meteor/local/*
.idea/
npm-debug.log
packages/*/.npm/
你可以使用本网站https://www.gitignore.io/产生任何项目的.gitignore文件,只需插入您使用thechnologies和你的IDE
.meteor /地方是你想要的版本控制唯一缺少的东西。
流星自动生成,将满足您的需求的.gitignore文件。
如果这是你很可能要包括“设置 - development.json”或包含信息的任何其他文件的JSON你不想向公众披露,例如AWS API密钥的公共仓库。
然而到位桶和其他一些人提供了应该满足您的需求免费的私人仓库。