[详细]上传项目到码云(gitee)私有仓库

条件:安装好git 创建好码云私有仓库

步骤:

  1. 设置邮箱帐号:git config --global user.email ""123@qq.com(自己的邮箱)"
  2. 设置码云昵称:git config --global user.name "your name"
  3. 生成 sshkey:ssh-keygen -t rsa -C " 你的邮箱 "
  4. 查看公钥:cat  ~/.ssh/id_rsa.pub
  5. 登录码云添加公钥
  6. 配置本地的git忽略文件 在git bash中 vim .gitignore (其他自行百度)
  7. 初始化git仓库:git init
  8. 链接远程仓库:git remote add origin "ssh地址"
  9. 把远程仓库的文件拉下来:git pull
  10. 添加所有文件: git add --all 或者git add .
  11. 添加注释: git commit -m ""yours annotation"
  12. 上传文件到master分支:git push -u origin master
posted @ 2021-01-14 20:34  Chesney张帅  阅读(1121)  评论(0编辑  收藏  举报