接着是创建github repository仓库
进入github?


?
复制ssh连接地址,也可以在your repository找到

#创建令牌
登陆github,点击头像然后选择setting

在左边栏目行最下选中Developer setting
?
选择 Personal access tokens ,然后Generate new token

Title可以任意起名,?生成的token令牌要保存下来!用记事本,切换出去就不提供了,要重新创建。
完了打开IDEA File?->setting ->Version Control ->git ,选择git安装地址 然后test连接 出现sucessfful就连接成功
 
?进入git下面的github ,然后 +,sign in用不了 所以选择token登陆,复制创建的token令牌,粘贴到Token里面
?
?创建一个新文件夹,进入该文件夹打开git base here,本地仓库初始化? 用 $ git init ,再克隆下载github仓库? ?$ git clone ssh地址 上面repository code下面的ssh地址

?
?在IDEA里面输入git remote add orgin ssh://你的ssh连接地址 然后回车
再git remote
添加连接github地址
?把ssh路径添加到url上面

创建项目仓库
手动连接到本地仓库然后上传到github仓库

?
?
?上传文件到repository仓库,commit and?push 是上传到本地仓库和github仓库,cmomit message是描述这次上传的内容,可以任意写
 
?完成上传?

注意!!
第一次上传如果报错push rejected

打开终端Terminal 切换到项目路径下

执行git pull 回车
执行git pull origin master --allow-unrelated-histories 回车
执行git push -u origin master -f
再查看github仓库效果
就已经上传完成啦。
? ?

|