天天看點

vs code 推送新項目到碼雲

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 ,強制指令會覆寫别人分支,慎用!!