项目上传到github中
一、创建个springboot项目

二、打开github,创建仓库

三、创建仓库,仓库名可与项目名一样


三、找到项目所在目录,打开git Bush Here

三、依次输入以下命令
git init
git add .
git commit -m "first commit"
下面这两行若已经设置可不输入
git config --global user.email "wu_xie666@163.com"git config --global user.name "wuzk"
git commit -m "first commit"
git remote add origin https://github.com/wuxie666/wuzk.git
push的时候因为网络问题会多次失败,需要很多次重试,可恶的网络(还好我开了代理)
git push -u origin master
好的,到这里就push成功了,去github上刷新下看看push上的项目

另外,在IDEA中commit和push的时候会要求登录github,可创建个token,登录github,这样就可以正常push代码了,创建token的链接如下:
IDEA使用token登录github_idea github token-CSDN博客