61

私はFacebook/React Nativeで遊んでgit initnode_modulesます.

すべての iOS フォルダーをコミットする必要がありますか?

ありがとう

4

6 に答える 6

9

この .gitignore をお勧めします: react-native/Examples/SampleApp/.gitignore

ユーザー固有の Xcode ファイルとディレクトリの両方を無視しますnode_modules

于 2015-03-27T17:39:35.287 に答える
3

これは関連する質問です:<a href="https://stackoverflow.com/questions/18939421/what-should-xcode-6-gitignore-file-include">Xcode 6 gitignore ファイルには何を含める必要がありますか?

次の 3 つのカテゴリに分類できます。

  1. IDE (Webstorm、Xcode) 構成ファイル、次のように: .idea/,ios/ProjectName.xcodeproj/xcuserdata
  2. 次のようなバージョン管理ツール (git、svn) ファイル: .git
  3. 他のファイル、たとえば、.DS_Store は OSX dir 構成ファイルです。

私の答えは、実際に検査されたものです:

### SVN template
.svn/
### Xcode template
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries
.idea

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### TortoiseGit template
# Project-level settings
/.tgitconfig

*.swp

# node_modules/,Xcode and Webstorm will spend lots of time for indexing this dir
node_modules/

# ios/Pods,
ios/Pods/

# OS X temporary files that should never be committed
.DS_Store
src/components/.DS_Store

# user personal info,for example debug info
ios/ProjectName.xcodeproj/project.xcworkspace/
ios/ProjectName.xcodeproj/xcuserdata

# Podfile versions
ios/Podfile.lock

# Created by .ignore support plugin (hsz.mobi)

それがあなたを助けることを願っています!

于 2016-08-30T02:06:40.453 に答える
-2

React Nativeの例を見ると:

https://github.com/facebook/react-native/tree/master/Examples

それぞれに、react-native-cli によって生成された iOS ディレクトリと同様の内容のディレクトリがあります。Xcode プロジェクト ファイルをさらに調べてみると、そこにも参照されていて、その内容を見ると、起動画面のようなものがあります。

はい、iOS ディレクトリが必要です。

node_modules については、詳細を提供するこの回答をご覧になることをお勧めします。

https://stackoverflow.com/a/19416403/125680

于 2015-03-27T15:17:46.447 に答える