eclipse提交多个项目到同一个git远程仓库

现在Eclipse一般默认安装的git插件是EGIt,可以通过它同GitHub服务器数据交互;下面在Eclipse中创建多个项目提交到同一个GItHub仓库中,具体如下:

在GitHub上先建一个远程仓库:

eclipse提交多个项目到同一个git远程仓库

 

eclipse提交多个项目到同一个git远程仓库

建好如下,并复制项目URL:

 

eclipse提交多个项目到同一个git远程仓库

 

在本地创建一个本地仓库:

在Eclipse中打开Git资源库,单击下图任一个:

eclipse提交多个项目到同一个git远程仓库

 

粘贴刚才复制的URL:

eclipse提交多个项目到同一个git远程仓库

 

eclipse提交多个项目到同一个git远程仓库

 

克隆到本地仓库:

eclipse提交多个项目到同一个git远程仓库

 

本地仓库如下:

eclipse提交多个项目到同一个git远程仓库

 

创建第一个项目并提交到GitHub:

eclipse提交多个项目到同一个git远程仓库

 

写一个main方法:

eclipse提交多个项目到同一个git远程仓库

 

把第一个项目提交到本地仓库中:

eclipse提交多个项目到同一个git远程仓库

 

填写提交信息并选择需要提交的文件:

eclipse提交多个项目到同一个git远程仓库

 

提交本地仓库完成:

eclipse提交多个项目到同一个git远程仓库

 

把本地仓库中的更改提交到远程仓库GitHub服务器中:

eclipse提交多个项目到同一个git远程仓库

 

 

eclipse提交多个项目到同一个git远程仓库

 

选择要提交的资源的指向和目标指向:

eclipse提交多个项目到同一个git远程仓库

 

eclipse提交多个项目到同一个git远程仓库

 

eclipse提交多个项目到同一个git远程仓库

 

提交完成:

eclipse提交多个项目到同一个git远程仓库

 

在GitHub中确认提交成功:

eclipse提交多个项目到同一个git远程仓库

 

创建第二个项目并提交到GitHub服务器:

 

创建一个Maven项目:

eclipse提交多个项目到同一个git远程仓库

 

 

eclipse提交多个项目到同一个git远程仓库

 

eclipse提交多个项目到同一个git远程仓库

 

提交到本地仓库和远程仓库操作同上,提交后如下:

eclipse提交多个项目到同一个git远程仓库

 

把远程仓库GitHub服务器中的更改更新到本地仓库:

在GitHub中新建一个README文件:

eclipse提交多个项目到同一个git远程仓库eclipse提交多个项目到同一个git远程仓库

 

选择Test1或Test2任一个右击,如下更新:

eclipse提交多个项目到同一个git远程仓库

 

更新完成:

eclipse提交多个项目到同一个git远程仓库

 

确认更新成功:

eclipse提交多个项目到同一个git远程仓库