git clone https://github.com/facebook/react-native.git
git add . (注:别忘记后面的.,此操作是把Test文件夹下面的文件都添加进来)
git commit -m "提交信息" (注:“提交信息”里面换成你需要,如“first commit”)
git push -u origin master (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)
npm install -g 失败
http://blog.csdn.net/nickfang/article/details/50148049
修改https 配置为http。
运行
npm config set registry http://registry.npmjs.org/
再运行npm install -g React-native-cli 成功。
react-native init AwesomeProject(初始化项目慢)
warning There appears to be trouble with your network connection. Retrying...
1>找到Node.js的安装目录,进入nodejs\node_modules\npm找到文件npmrc,打开后在该文件末尾加上