这个教程是我一个大佬朋友教我的,他也有个github的账号,还写了很多好玩的项目,可以去支持一波
首先在github里面新建一个空的项目
然后用vscode打开你想要写项目的工作空间
新建一个README.md用来写readme
再按ctrl+~打开终端
git init
git add README.md
git branch -m main
git remote add origin 你的github仓库地址
git add .
git commit -m "此次提交的附加信息"
git push origin main
这样就可以把你的代码提交到你的github仓库了