reactjs - 反应原生 git 忽略
问题描述
这是我的 gitignore 文件
# 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
# Android/IntelliJ
#
build/
.idea
.gradle
*.so
*.dex
*/build/*
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.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
# CocoaPods
/ios/Pods/
template/plugins/typescript/template/tsconfig.json
我正在创建一个将在 npm 上的模块,问题是我应该如何为 android 设置 gitignore 文件?
它必须放在根文件夹还是 /android 文件夹中?
我尝试添加/build/和 * /dex 但不起作用我想在 react native 中忽略android/app/build和android/.gradle文件?
谢谢哈斯
解决方案
您可以使用此代码忽略 git ignore 中的构建文件夹和其他单相文件:
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
推荐阅读
- java - 由 Spring Boot 中的 :org.springframework.context.NoSuchMessageException 提供
- python - 如何在 Python 中处理键的部分匹配
- android - Android Studio 4.1:XML 资源 ID 自动获取问题
- python - 使用 cupy 从 GPU 上的另一个矩阵创建距离矩阵
- regex - 正则表达式替换:替换文本,而不是代码
- r - 如何从嵌套的 xml 结构中获取数据?
- twig - 模板无故生成错误
- typescript - 打字稿泛型约束不起作用
- docusignapi - 如何使用 eSignature 或任何其他 Docusign API 从 DSA 模拟“CreateAndSignField”方法
- c - 在链表中的特定节点之前插入一个节点