怎么用git将本地代码上传到远程服务器_[记录]把已有的本地代码提交到远程git服务器...

已有本地代码:

licrifandeMacBook-Pro:Sourcecode crifan$ ls -ls

total 402232

0 drwxr-xr-x  15 crifan  staff        510  5 20 15:33 QorosSales

402232 -rw-r–r–   1 crifan  staff  205942519  5 20 14:52 QorosSales_CarthageCocoapods_20160520.zip

0 drwxr-xr-x   3 crifan  staff        102  5 23 09:34 SalesApp

中的SalesApp

想要上传到远程到git服务器

licrifandeMacBook-Pro:Sourcecode crifan$ ls

.DS_Store                                  QorosSales_CarthageCocoapods_20160520.zip  SalesAppiOS/

QorosSales/                                SalesApp/

licrifandeMacBook-Pro:Sourcecode crifan$ ls SalesAppiOS/

README.md

licrifandeMacBook-Pro:Sourcecode crifan$

把项目和代码都拷贝进去:

再去弄一个.gitignore:

然后去上传:

error: pathspec ‘SalesApp/Assets.xcassets/Tab/.DS_Store’ did not match any file(s) known to git.

error: pathspec ‘SalesApp.xcodeproj/xcuserdata/crifan.xcuserdatad/xcschemes/SalesApp.xcscheme’ did not match any file(s) known to git.

error: pathspec ‘SalesApp.xcodeproj/xcuserdata/crifan.xcuserdatad/xcschemes’ did not match any file(s) known to git.

error: pathspec ‘SalesApp.xcodeproj/xcuserdata/crifan.xcuserdatad’ did not match any file(s) known to git.

error: pathspec ‘SalesApp.xcodeproj/xcuserdata’ did not match any file(s) known to git.

error: pathspec ‘SalesApp.xcodeproj/xcuserdata/crifan.xcuserdatad/xcschemes/xcschememanagement.plist’ did not match any file(s) known to git.

取消对应文件的选择:

再去上传,就可以了:

第一次,要求输入用户名和密码:

然后git服务器端就可以看到代码了:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值