把本地项目添加到码云

一、在码云上新建仓库,并命名为本地项目的项目名

二、在本地项目中右键git bash here进入git bash

  1.使用git init 初始化建立git仓库

  2.该电脑首次使用git需要配置user.name和user.email才能最后push代码

    使用git config --global user.xx配置

    

  3.输入git remote add origin +码云的项目路径 ,将你地仓库与码云上的远程仓库关联起来

  4.输入 git pull origin master 命令,将码云上的仓库pull到本地文件夹 (会提示输入码云的账号密码)

  5.使用git add . 把文件添加到暂存区

  6.使用git commit -m '新文件描述'    把文件提交

  7.使用git push origin master 把文件添加到master分支

  8.在码云刷新就可以看到添加的新文件

猜你喜欢

转载自www.cnblogs.com/yellowwenhao/p/11348449.html