1、安装elcipse的egit插件
help-install new softwear --add
添加egit。
name:随便填写,这里写egit
Location: http://download.eclipse.org/egit/updates
根据提示安装egit插件
2、配置git
点击window-prefreence-term-git
配置git的repository的路径(随便指定一个目录即可),如下图所示:
点击git- configuration配置email和name。点击add entry添加,如下图所示:
3、将项目发布到git
(2) 在项目上点击右键选择 team-share project,选择git。
(2)点击add添加目录存放项目。
(3)点击team选择commit提交项目。
4、将项目push到github
创建仓库:这里以http://git.oschina.net的远程仓库管理为例,你同样可以管理http://github.com、http://gitcafe.com的仓库。
(1)创建项目
(2)赋值创建的https 如;https://git.oschina.net/tydldd/hadoop_lbs.git
(3)右键点击项目-tream - remote - push
将赋值的https复制到uri里,输入用户名密码点击下一步。
(4)默认的branch是master
(5)点击完成,push项目
5、从oschina git 克隆项目
(1)切换到git视图
(2)添加一个repository
将os git的https连接复制到uri里,填写用户名密码
依次点击next选择branch,最后选择finish。
(3)将项目导入eclipse中
添加的repository-working directory上点击右键
(4)选择import projects
一次点击next完成导入