git config --global user.name "xxxx"
git config --global user.email "xxxxx@qq.com"
进入本地需要上传的文件夹:
git init
git add .
git commit - m "项目名称"
在GitHub上新建一个repository
关联本地仓库并上传代码:git remote add origin https://github.com/xxxxx.git(新建repository后会有一个地址)
最后执行上传推送命令:git push origin master
注意:
密码不再是用户密码,而是生成的token,参考这个博客:remote: Support for password authentication was removed on August 13, 2021_IT博客技术分享的博客-优快云博客