VScode上传Vue项目到GitHub上

通过vue create “项目名” 生成的Vue项目默认是有.git文件夹的,但是没有指定上传的地址。
VScode上传Vue项目到GitHub上_第1张图片

那么,我们想把Vue项目到GitHub上,该如何做呢?

首先在自己的GitHub上新建一个仓库,复制仓库的地址,通过命令上传代码到GitHub上:

PS F:\vue\MyApp> git remote add origin https://github.com/Linliuxing/vant-ui.git
PS F:\vue\MyApp> git push -u origin master
fatal: HttpRequestException encountered.
   发送请求时出错。
fatal: HttpRequestException encountered.
   发送请求时出错。
Username for 'https://github.com': *********@qq.com
Password for 'https://*********@[email protected]':
Counting objects: 24, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (24/24), 77.20 KiB | 3.09 MiB/s, done.
Total 24 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), done.
To https://github.com/Linliuxing/vant-ui.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

以后新增和修改的文件就可以通过Vscode的“源代码管理”上传代码了。
VScode上传Vue项目到GitHub上_第2张图片

你可能感兴趣的:(前端开发)