vs code 推送新项目到码云
vs中操作
1 打开命令框
ctrl + shift + p
2 初始化存储库
git initialize repository
3 vs中提交想要添加的项目
git commit
cmd中操作
4 cmd打开项目根目录,添加远程git仓库
git remote add origin https://gitee.com/loveliyq/vue.git
5 vs中提交想要添加的项目
git commit
6 推送到码云
git push -u origin master
如果出现以下错误
hint: Updates were rejected because the tip of your current branch is behind…
使用 git push -u origin master -f ,强制命令会覆盖别人分支,慎用!!