React-native: gitignore about ios/build/ is not work

Created on 9 May 2017  路  4Comments  路  Source: facebook/react-native

i use https://github.com/facebook/react-native/blob/master/.gitignore in my project,
use "react-native run-ios" build some files in "ios/build/"
i add ios/build/ into the .gitignore,but is not work,

Locked

Most helpful comment

Commit your code, and try this:

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"

Source: StackOverflow

And here is my .gitignore file for my react application:

# 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/
npm-debug.log
yarn-error.log

# 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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

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

All 4 comments

Be more specific. How so?

Which files is it including that you think it should not be? You should also tell us your version of git and react-native. npm list should give you some information. We need more information about what version of react-native you are on and also what version of git. How did you create your react native app? Please tell us specifically what files are not being ignored. What is your file structure etc. Where are these files that are being included but should not be? Do you have a .git directory and at what level is it?

Commit your code, and try this:

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"

Source: StackOverflow

And here is my .gitignore file for my react application:

# 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/
npm-debug.log
yarn-error.log

# 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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

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

this is my fault ,my colleague commit these files

Was this page helpful?
0 / 5 - 0 ratings