基于window 10零碎,默认已装置过vue、npm、git bash,学过git。

1、在github上新建仓库:new repository

2、填写仓库信息(仓库名称、形容、是否公有、初始化文件)

3、复制git地址:

4、进入本地文件夹,在命令行或者git bash执行命令:git clone

5、本地开发,上传文件:
git add hello.txt
git commit -m "first commit"
git push -u origin main
push完之后会让你填token,具体获取token请看[CSDN传送门]。如果不想这个,那就打命令:

git remote set-url origin https://你的token@github.com/你的名字/你的仓库名字.git/

(https://blog.csdn.net/weixin_...)

6、胜利提交:

问题:
1、报错:Fail to connect to github.com port 443:Timed out
解决:减少windows凭据:参考
如果凭据有了,就可能是网络问题

2、报错:remote: Support for password authentication was removed on August 13, 2021.
解决:git remote set-url origin:参考