Hasith Lakshan
Hasith Lakshan

Reputation: 3

react native git ignore

this is my gitignore file

# 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

I'm creating a module that will then be on npm, the question is how should I set the gitignore file for android?

Must it be placed in the root folder or in the /android folder?

i tried adding /build/ and */dex but not work i want to ignore android/app/build and android/.gradle files in react native ?

thanks hasith

Upvotes: 0

Views: 2794

Answers (1)

Dipan Sharma
Dipan Sharma

Reputation: 1133

you can use this code to ignore the build folder and other unrequited files from the git ignore:

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

Here is the useful link: Recommended .gitignore for react-native

Upvotes: 1

Related Questions