Git(一):Eclipse中配置Git

在Eclipse中配置Git:

一,由于我使用的是新版本的eclipse j2ee 4.4默认集成git,所以不用手动安装git插件

二,Eclipse配置基础信息。Windows->Preferences->Team->Git 如下图:

 

Preferences->Team->Git->Configuration

点击Add Entry,在弹出框里面输入key和value的值
key,名字填写:user.name,value是你的名字。
邮箱:user.email  value:你的邮箱账号.你提交代码时候,会自动提取这些信息,和代码一起发送到git远程仓库

 

 

三,在Eclispe中配置本地Git repository

在eclipse中新建一个项目,然后右键项目名称,选择Team->Share Project->Git点击Next按钮,在Configure Git Repository页面,点击Create

选择本地文件夹,作为Git 本地的Repository

四,提交代码到本地Git Repository

选择项目名称,右键Team->Commit

填写相应的信息,点击Commit.

 

五,Eclispe中配置Git Remote Repository

调出Git Repository窗口

右键Remotes,选择create remote

输入Remote name点击OK按钮,

在URI栏,点击change按钮,填写对应的Git Sever的信息

保存。

 

六,将本地Git Repository的代码Push到remote repository

右键工程,Team->remote->push branch

填写相应的信息,这样就把本体仓库的项目推送到remote repository了

 

posted @ 2016-04-11 17:08  熊猫不是猫  阅读(7386)  评论(0编辑  收藏  举报