将本地项目上传至gitee的详细步骤

将本地项目上传至gitee的详细步骤

1.在gitee上创建以自己项目名称命名的空项目

2.进入想上传的项目的文件夹,然后右键点击

3. 初始化本地环境,把该项目变成可被git管理的仓库

cpp 复制代码
$ git init

4.添加该项目下的所有文件

cpp 复制代码
$ git add .   (注意这里有个点)

5.使用如下命令将文件添加到仓库中去

cpp 复制代码
$ git commit -m '本次提交的说明'(说明信息为必填项,最好是信息有意义,便于后期理解)

6.将本地代码库与远程代码库相关联

cpp 复制代码
$ git remote add origin https://gitee.com/qlqaq/projects/仓库名称

7.强制把远程仓库的代码跟新到当前分支上面。ps:如果仓库为空这一步可以跳过

cpp 复制代码
$ git pull --rebase origin master

8.将本地代码推送到指定远程的仓库中

cpp 复制代码
$ git push -u origin master
相关推荐
xiaoerbuyu12334 天前
仿微信听书进度条
gitee
月夜风雨磊6 天前
Android NDK从r10c版本到r29版本的下载链接
android·gitee·android ndk
似霰14 天前
安卓系统属性之androidboot.xxx转换成ro.boot.xxx
android·gitee
liansmo15 天前
Git与TortoiseGit在Gitee平台的应用
git·gitee
eduics15 天前
Pull Request 中提示`commits incorrectly signed off`
gitee·github
不念霉运16 天前
Gitee推出“移动软件工厂“解决方案 解决嵌入式与涉密场景研发困局
gitee
不念霉运16 天前
DevOps平台大比拼:Gitee、Jenkins与CircleCI如何选型?
gitee·jenkins·devops
fly五行17 天前
Git基础玩法简单描述
大数据·git·搜索引擎·gitee
不念霉运17 天前
Gitee:本土化DevOps平台如何助力中国企业实现高效研发协作
运维·gitee·devops