eclipse提交代码至GitHub

1. 要使用GitHub首先需要注册一个GitHub账号,并创建一个Repository

2. 在eclipse上安装git插件 

首先选择Help -> Install New Software

2.0 从这里面找到 对应的 版本 ,版本太重要了  

http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F

2.1 弹出如下窗口,点击Add按钮  下面的要全选 

eclipse提交代码至GitHub

2.2   添加  name  location

name  git

location http://download.eclipse.org/egit/updates  这个是 对应的那个地址 

2.3 安装完成之后 重启 eclipse 

2.4 在Window -> Preferences -> Team -> Git -> Configuration中配置GitHub的用户信息

eclipse提交代码至GitHub

 

3.0 创建一个新项目 

右键  --- team --- share project ---- git  ---- next 

第一次本地创建一个git 仓库 

eclipse提交代码至GitHub

点击 create  repository 

 

3.1 team  --- commit  --- 只提交java 文件

eclipse提交代码至GitHub

3.2  commit and push 是 提交到本地 并且 提交到 github 

commt 是 只提交到本地

如果是 commit  --- 右键项目 --- team ---remote  ---push 

3.3  Ecplise git commit时出现"There are no stages files"

勾选下面 的内容   ,如果原来是 勾选就 去掉 

eclipse提交代码至GitHub

4.0  提交到 github 上 

4.1  team --- remote -- push 

 

eclipse提交代码至GitHub

 

5.0 向  github 上面提交  

5.1  选择 分支

eclipse提交代码至GitHub

5.2 add spec 

eclipse提交代码至GitHub

5.3 add spec 之后 

eclipse提交代码至GitHub

5.4  选择  force update 

eclipse提交代码至GitHub

5.5 完成之后  提交到 github 完毕 

eclipse提交代码至GitHub

 

转载于:https://my.oschina.net/gh200/blog/1510143