Xcode从新建项目, 推到远程仓库

2017-03-20  本文已影响113人  L_zix

1. 首先新建Xcode项目, 并勾选git管理

勾选

2. 通过终端, cd到你的项目下

3. 加入你在远程仓库, 新建了一个仓库, 地址是https://github.com/userName/repoName

4. 在终端下: 添加一个远程仓库地址, git remote add repoName https://github.com/userName/repoName

5. git pull --rebase repoName master

6. git push repoName master

之后就远程仓库就有你的项目了. 但此时git pull --rebase却提示fatal: No remote repository specified.Please, specify either a URL or a remote name from which new revisions should be fetched.

搞了好久, 好像很.git/config有关. 手足无措=.=

此时你可以把本地工程删除, 再git clone https://github.com/userName/repoName

就完美解决了. 可以随时git pull , git push. 不用再加repoName了=.=

上一篇 下一篇

猜你喜欢

热点阅读