git上传整个项目到码云

一、简介

    上传demo项目到码云。

二、操作

    1.在码云上创建一个demo项目获取到项目地址:

        https://gitee.com/name/demo.git

    2.进入到demo项目根目录,并初始化git

cd demo
git init

    3.将代码添加到远程仓库

git remote add origin https://gitee.com/name/demo.git

    4.推送到远程仓库master

git add .
git commit -m '初始化工程'
git push -f origin master

    5.推送到远程服务器会报错:需要下载码云目录中的README.md文件

git pull --rebase origin master

    6.再次推送到远程仓库master

bogon:cfl-account-boot chenfenli$ git push -f origin master
Counting objects: 363, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (213/213), done.
Writing objects: 100% (363/363), 55.07 KiB | 1.08 MiB/s, done.
Total 363 (delta 67), reused 0 (delta 0)
To https://gitee.com/chenfenli/cfl-account-boot.git
   63ab001..b910d7c  master -> master
bogon:cfl-account-boot chenfenli$ 

猜你喜欢

转载自blog.csdn.net/oJueQiang123456/article/details/79747066