一、GitHub上创建空仓库

(首先要有一个GitHub的账号)

二、填写仓库基本信息创建

(选择public)

三、创建后把仓库的git地址copy出来备用,url后加上.git

(https://github/jrt-20/test.git)

四、IDEA上代码关联本地git

(去git官网下载一下git,在IDEA中选择相关路径)

五、idea中创建git仓库

六、idea上代码本地提交

1、点击要提交的项目, 找到git并点击Commit

2、push到remote

点击push

添加remote的url

点击ok

至此,IDEA就连接GitHub成功了。

更多推荐

IDEA连接GitHub