8

gitee上传代码到仓库步骤(最简洁图文+命令说明) - 诗风雅韵

 1 year ago
source link: https://www.cnblogs.com/zbqblogs/p/16255061.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

gitee上传代码到仓库步骤(最简洁图文+命令说明)

1、初始化项目

git init
初始化项目,先在本地去创建git仓库(后面才同步到关联的远程仓库托管)
在这里插入图片描述

2、将当前目录下所有需要上传的文件代码等资源添加到缓存区

git add .
在这里插入图片描述

3、 提交缓存区里面的主要内容到本地仓库

git commit -m "提交说明"

在这里插入图片描述

4、添加一个远程仓库的地址

git remote add origin https://gitee.com/zhang-bingqian/crm.git
(远程仓库的地址)

在这里插入图片描述

5、提交本地仓库到远程仓库

git push -u origin master
因为第一次提交 所以要加一个 -u

在这里插入图片描述

6、常见问题:

第5步出现:
error: failed to push some refs to 'https://gitee.com/zhang-bingqian/crm.git 可以移至我的另一篇专门讲解此问题的解决博客
点击跳转


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK