1、先在自己的码云里新建仓库

2、仓库起好名字,配置好参数,必填的填上就行,私有的就只有自己能看见

3、把项目准备好,比如 e盘下 项目文件 test,进入test文件夹 右键 Git Bash Here

然后在命令窗口一次敲命令就可以了
(1)、git config --global user.name '码云的用户名'
(2)、git config --global user.email '邮箱'
(3)、git init (这步就会生成 .gitignore文件了)
(4)、git remote add origin http:xxx (http就是刚刚在码云创建的仓库地址,点击 '克隆/下载' 直接复制地址粘贴到命令就可以 )

(5)、git add -A (暂存)
(6)、git commit -m '第一次提交代码'
(7)、git pull origin master --allow-unrelated-histories
(8)、git push -u origin master
来源:CSDN
作者:小麻椒
链接:https://blog.csdn.net/qq_39109182/article/details/104667754