整个流程分两步进行:
- 创建空仓库
- 推送已有代码至仓库
首先,我们要在Gitee上创建一个空仓库(这个不用说了叭),什么README文件或其他配置都不要勾选或创建,到这个页面为止:
OK,至此一个空仓库就建好了(打码的地方是等会儿要用的地址,假设为https://gitee.com/xxx/test.git
)
第二步,在要上传的代码文件夹处右键Git Bash Here
:
Git 全局设置(如果之前用github或gitee在电脑上配置过的就不用管)
git config --global user.name "存储填你自己的用户名"
git config --global user.email "xxxxxxxxxx@xx.com"
然后依次输入以下命令:
git init
touch README.md
git add .
git commit -m "first commit"
git remote add origin https://gitee.com/xxx/test.git
git push -u origin "master"
执行完毕即可。
完结撒花~~~
有帮助的话点个赞再走吖亲