图解Eclipse提交项目到GitHub上

 时间:2026-05-14 01:31:27

1、登录github,选择 new repository。

2、在Eclipse中new project  比如:Test项目。

3、右击"Test"->Team->share project...  ->select a repository type:Git,如下图所示:

图解Eclipse提交项目到GitHub上

4、勾选  Use or create repository in parent folder of project,如下图所示:

点击  Create Repository  ->  Finish这时候打开在workspace中的Test目录会发现多了一个.git文件夹。

图解Eclipse提交项目到GitHub上

5、右击"Test"->Team->commit 本地提交。

6、再右击"Test"->Team->Remote->Push,如下图所示:

图解Eclipse提交项目到GitHub上

7、URI就是github上面指定的地址,如下图所示:

username和password就是github网站的用户名和密码。

图解Eclipse提交项目到GitHub上

8、点击finish,source ref 选择 refs/heads/master  destination ref会自动填充,点击  Add Spec勾选Focus updat,开始提交,如下图所示:

图解Eclipse提交项目到GitHub上

9、可以刷新网页查看提交的代码了,如下图所示:

注:在Eclipse中生public key, 并添加到GitHub Repository中在菜单栏依次打开window → preference → general → network connection → SSH2 → Key Management → generate RSA Key... → apply → save private key...

生成 SSH 的 public key在GitHub中通过:edit your profile -> ssh key -> Add SSH Key 添加SSH Key, 

图解Eclipse提交项目到GitHub上

  • Eclipse实现web项目部署
  • Git Extensions 如何快速查找单个文件历史
  • Eclipse怎么集成Maven
  • tomcat怎么启动spring框架代码
  • TortoiseSVN安装与使用教程:[1]如何安装SVN
  • 热门搜索
    coat是什么意思 始料不及的意思 怀孕7个月要注意什么 清明古诗的意思 颜值高是什么意思 enabled是什么意思 0x0000008e蓝屏代码是什么意思 农村养什么致富 新款汉兰达什么时候上市 老司机是什么意思