eclipse配置Git

安装egit: 

1.help-->Install new software-->add:

  输入name 和 location(下载地址)

  点击OK,然后next到底即可。

    eclipse和Git版本对应参考地址:http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F

    我用的eclipse4.3(Kepler)和Git3.0.1:http://download.eclipse.org/egit/updates-3.0.1

 

 2. help-->Eclipse Marketplace:查找Git,点击安装,confirm到底。

 

配置:

preferences->team-->git-->configuration:add entry

 输入gitlab的用户名和邮箱

  eg

   key:user.name   value:你的用户名

   key:user.email   value:你的邮箱

注:此处修改的是C:UsersAdministrator..gitconfig文件,如果你安装GIT 是配置过git -config ,则此处会自动导入.config文件中的键值对。

通过eclipse push项目:

 右击项目名-->team-->share project-->git

 

点击create创建本地仓库(自定义位置):

 项目名后面多了个NO-HEAD

 

 选择要提交的文件,右击-->team-->commit

填写备注,选中要commit的文件

此时项目分支表明为master

 

 commit后将项目pypush到远程仓库:

右击项目-->team-->remote-->push:

URI是远程仓库的地址,直接从网页端复制过来即可,填写用户名和密码

 选择分支-->add-->finish,即可成功push。

原文地址:https://www.cnblogs.com/Janine-S/p/7510684.html