Yuan He Yuan He - 1 month ago 6
React JSX Question

What's part should be ignored by git in React Native project?

I'm playing with Facebook/React Native, and when i run

git init
, i have no idea what should be ignored expect
node_modules
folder,

should i commit all iOS folder?

Thanks

Answer

If you look at the React Native examples:

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

Each one has a directory with a contents similar to the iOS directory generated by react-native-cli. Looking further into the Xcode project file, it's referenced in there too, and look at the contents - there's things like the launch screen.

So yes, the iOS directory is needed.

Regarding node_modules, I suggest you look at this answer which provides more information:

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