1、码云上新建一个仓库 XXXX (仓库名)
2、cd 到你要上传项目的文件夹中 //右击鼠标git bash
3、使用 git init 命令 //初始化一个git 本地仓库此时会在本地创建一个 .git 的文件夹(博主这里看不到,应该是隐藏了)
4、使用git remote add origin https://gitee.com/你的码云用户名/仓库名 //添加远程仓库
5、(1)使用 git pull origin master 命令,将码云上的仓库pull到本地文件夹
(2)或者git clone 此链接-->
6、将要上传的文件,添加到刚刚创建的文件夹
7、使用git add . (. 表示所有的)或者 git add + 文件名 // 将文件保存到缓存区
8、使用git commit -m '新添加的文件内容描述' //添加文件描述(可能会有错误,看下文)
9、使用git push origin master ,将本地仓库推送到远程仓库
10、solve
如果在第八步遇到以下错误
8.git commit -m "some init msg"
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'Administrator@MS-201610130300.(none)')
在git命令行中输入以下,即可
git config --global user.email "你的邮箱"
git config --global user.name "你的名字"
如果有问题或者建议请多提出交流
you friend at CSND :)