最新消息:20190529 VPS服务器已从腾讯云香港换为Vultr新加坡,主题仍用朋友推荐的大前端D8

[记录]把已有的本地代码提交到远程git服务器

Git crifan 461浏览 0评论

已有本地代码:

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服务器端就可以看到代码了:

转载请注明:在路上 » [记录]把已有的本地代码提交到远程git服务器

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
63 queries in 0.103 seconds, using 18.81MB memory