打开xcode创建一个工程,比如我创建的工程名TESTDemo,然后打开终端,进入TESTDemo文件夹,输入Creat a new repository on the command line提示的命

xcode上传工程到github(转载)





标注的是命令 对应的位置换成自己的工程即可

解释下输入的命令:

1)touch README.md文件是关于工程代码的介绍,类似与使用说明书

2)git init  初始化一个本地的 git仓库,生成隐藏的.git目录(隐藏的.git目录可使用ls -aF命令可以查看到)

3)git add  README.md  把README.md文件添加到仓库中

4)git commit -m "first commit"  执行提交说明,在Gitz中这个属于强制性的

5)git remote add origin https://github.com/XFZLDXF/TEST.git  添加本地仓库origin和指定远程仓库地址

6)git push origin master  推送本地仓库到远程指定的master分支上

需要注意的是第五步 换成ssh之后就变成了  bob:FiberstoreManager apple$ git remote add origin [email protected]:liuboliu/fibermanager.git

相关文章:

  • 2021-04-09
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-10-29
  • 2021-04-20
  • 2022-01-24
猜你喜欢
  • 2021-04-26
  • 2021-10-29
  • 2021-12-12
  • 2021-05-30
  • 2021-12-26
  • 2021-09-13
  • 2021-07-13
相关资源
相似解决方案