反应原生的推荐.gitignore

DeX*_*eX3 22 android gradle react-native

我正在尝试将native和ejected编译成完整的构建环境.遗憾的是,弹出脚本没有创建一个合理的.gitignore文件.

不太了解应用程序开发,我想知道我可以.gitignore在这里找到什么目录?

我正在猜测:

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

这些没关系,还是还有我应该的目录.gitignore

ben*_*nel 36

以下是该.gitignore命令附带的文件react-native init.你可以在这里找到完整的文件.

# 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 yarn - don't use botn yarn and npm
npm-debug.log
yarn-error.log
yarn.lock # include if you are using npm - 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
Run Code Online (Sandbox Code Playgroud)

  • 应该提交package-lock.json或yarn.lock (2认同)