eclipse中git的安装 配置 和 使用

1.eclipse中git的安装
(1) 现在的eclipse下载后一般都提供Git插件了。
eclipse中git的安装 配置 和 使用
(2) 如果没有,菜单栏Help -> Install New Software...,在Work with中输入http://download.eclipse.org/egit/updates,勾选Eclipse Git Team Provider和JGit,点击Next,进入安装,重启Eclipse,安装完成。
eclipse中git的安装 配置 和 使用

2.在eclipse中git的配置和使用
(1) 配置用户名,email:Windws……Preferences…..Team……Git……Configuration……Add Entry
eclipse中git的安装 配置 和 使用
(2) 检查SSH key
eclipse中git的安装 配置 和 使用
(3) 新建一个web项目,此时它只是一个普通的javaWeb项目,未纳入git管理
eclipse中git的安装 配置 和 使用
(4) 变为Git项目
eclipse中git的安装 配置 和 使用
(5) 变为Git项目后说明情况
eclipse中git的安装 配置 和 使用
(6) Eclipse里面的项目提交到本地库
eclipse中git的安装 配置 和 使用
(7) 接下来就是和远程仓库进行操作:
     ① Github上新建一个同名的空仓库
eclipse中git的安装 配置 和 使用
     ② 本地可以push到Remote
eclipse中git的安装 配置 和 使用
     ③ 本地可以Push到Remote,Eclipse里面的配置
eclipse中git的安装 配置 和 使用
     ④ Push
eclipse中git的安装 配置 和 使用
     ⑤ OK, 如果此步顺利,修改本地文件先push给远程github试试再更新pull试试
eclipse中git的安装 配置 和 使用
     ⑥ Github服务器上面更新了,pull到本地
eclipse中git的安装 配置 和 使用
     ⑦ 解决Eclipsei里面Pull操作的问题---1
eclipse中git的安装 配置 和 使用
     ⑧ 解决Eclipsei里面Pull操作的问题---2
eclipse中git的安装 配置 和 使用
     说明:上面红色不变,蓝色变为自己项目的路径
[branch "master"]
    remote = origin
    merge = refs/heads/master

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    push = refs/heads/master:refs/heads/master
     ⑨ 解决Eclipsei里面Pull操作的问题---3
eclipse中git的安装 配置 和 使用
     ⑩ 实际开发问题,我总不能肉眼随时去看看服务器版本是不是比我新或者比较旧,本地和服务器端不同步了如何保持一致性? 实际开发问题,和远程服务器比对,看看local和remote的情况
eclipse中git的安装 配置 和 使用