android - 推荐 .gitignore 用于 react-native

标签 android react-native gradle

我正在尝试 react native 和 eject 到一个完整的构建环境。遗憾的是,弹出脚本没有创建一个合理的 .gitignore 文件。

对应用程序开发不太了解,我想知道我可以在这里 .gitignore 哪些目录?

我猜:

  • android/build
  • android/app/build
  • android/.gradle/

这些都好吗,或者还有什么目录我应该.gitignore

最佳答案

下面是 .gitignore 文件随 react-native init 命令一起提供。你可以找到完整的文件here .

# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
package-lock.json # include if you are using npm - don't use both yarn and npm
npm-debug.log
yarn-error.log
yarn.lock # include if you are using yarn - don't use both npm and yarn

# BUCK
buck-out/
\.buckd/
*.keystore

# Fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use Fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

关于android - 推荐 .gitignore 用于 react-native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49099131/

相关文章:

android - 如何从使用其他应用程序创建的自定义帐户调用 accountManager.getUserData?

android - 在 Jellybean 中,相机 Intent 在使用 FileProvider 时返回 RESULT.CANCELLED

java - 下拉描述或可展开 View

java - 带按钮和 EditText 的 ListView

android - ERR_UNKNOWN_URL_SCHEME react native webview

java - 未找到 Gradle DSL 方法 : 'google()'

java - 创建第一个应用程序时 Flutter 出现错误 :checkDebugDuplicateClasses

reactjs - TSLINT 错误 : Property 'Component' does not exist on type 'typeof React'

react-native - 在 React Native 中显示键盘时如何不移动 View ?

android - 使用不遵守@Intdef注释的代码使Gradle构建在 Release模式下失败