有的eclipse已经自带了GIt了,就不用安装了。如果,想重新安装,可以先卸载GIT。
步骤1:在Eclipse中依次点击菜单"Help"->"About Eclipse",点击"Installation Details"按钮,选中要卸载的插件(按住Ctrl可多选),点击"Uninstall..."按钮。
卸载完后,进行安装Git,和安装一般插件过程一样:
步骤2:help --> Install new software
Name: git Location: http://download.eclipse.org/egit/updates/
安装好后,会重启eclipse,安装完成。
点击help——Marketplace,在里面输入git,查找,然后安装(有的eclipse有这项,有的没有)
步骤3:Windows --> Preferences --> Team --> Git --> Configuration
点击Add Entry,在弹出框里面输入key和value的值
key,名字填写:user.name,value是你的名字。
邮箱:user.email value:你的邮箱账号.你提交代码时候,会自动提取这些信息,和代码一起发送到git远程仓库
步骤3(创建本地仓库):创建一个项目,然后右键该项目 --> Team -> Share Project 选择 GIT -> next
勾选-> Use or create repository in parent folder of project 点击下面列出来项目,然后点击下面按钮,最后,finish,就创建了本地仓库。
步骤4(提交代码):项目右键 --> team --> commit
步骤5(push到远程仓库):项目右键 --> team --> remote --> push
填写完url,用户名,密码等,点击next,进入第二个窗口。
在Source ref: 和 Destination ref: 选择项中选择master,之后点击Add Spec 最后点击finish。
参考:http://blog.csdn.net/hhhccckkk/article/details/10458159
步骤1:在Eclipse中依次点击菜单"Help"->"About Eclipse",点击"Installation Details"按钮,选中要卸载的插件(按住Ctrl可多选),点击"Uninstall..."按钮。
卸载完后,进行安装Git,和安装一般插件过程一样:
步骤2:help --> Install new software
Name: git Location: http://download.eclipse.org/egit/updates/
安装好后,会重启eclipse,安装完成。
点击help——Marketplace,在里面输入git,查找,然后安装(有的eclipse有这项,有的没有)
步骤3:Windows --> Preferences --> Team --> Git --> Configuration
点击Add Entry,在弹出框里面输入key和value的值
key,名字填写:user.name,value是你的名字。
邮箱:user.email value:你的邮箱账号.你提交代码时候,会自动提取这些信息,和代码一起发送到git远程仓库
步骤3(创建本地仓库):创建一个项目,然后右键该项目 --> Team -> Share Project 选择 GIT -> next
勾选-> Use or create repository in parent folder of project 点击下面列出来项目,然后点击下面按钮,最后,finish,就创建了本地仓库。
步骤4(提交代码):项目右键 --> team --> commit
步骤5(push到远程仓库):项目右键 --> team --> remote --> push
填写完url,用户名,密码等,点击next,进入第二个窗口。
在Source ref: 和 Destination ref: 选择项中选择master,之后点击Add Spec 最后点击finish。
参考:http://blog.csdn.net/hhhccckkk/article/details/10458159