1、在码云注册一个账户
2、创建一个项目


3、设置ssh公钥

4、把生成的公钥添加到码云

5、git 打开本地项目路径下


6、git init (初始化仓库)
7、关联远程仓库git remote add origin 你的远程库地址如:git remote add origin https://github.com/cade8800/ionic-demo.git
8、git add . 文件 或 git add -A 或 git add . (提交文件)
9、git commit -m '注释' (提交文件)

注释这里注意如果git里没有设置过邮箱和姓名需要单独设置一下
全局设置用户名
git config --global user.name "nameVal"
全局设置邮箱
git config --global user.email "eamil@qq.com"
10、推送到远程仓库
git push -u origin master
tips:这步可能要填写码云的账号密码
tips: 推送到远程仓库可能报错

大概原因就是 意思是本地和远程的文件应该合并后才能上传本地的新文件
tips: https://blog.csdn.net/winnershili/article/details/78888548
11、git pull origin master (拉取远程仓库文件合并)
这步报错

运行:git pull origin master --allow-unrelated-histories
12、重复步骤8,9,10
网友评论