1.eclipse中配置git
Window-》preferences
左边搜索栏搜索git,一般eclipse会集成git插件不需要再安装,点击Add Entry配置代码提交一些信息
email:邮箱
name:名字
2.创建本地git仓库
右键项目-》Team-》Share Project
勾选-》Create Repository-》Finish
3.提交代码
右键项目-》Team-》Commit
右键需要提交的文件Add to Index ,添加Commit Message然后Commit到本地仓库
发送到远程仓库,在Github或Gitee创建好项目,项目名和eclipse的项目名相同
右键eclipse项目-》Team-》Remote-》Push
复制在Github或Gitee上创建项目的URI,Host和Repository path会自动填充,输入账号密码next
选择分支master-》Add Spec-》Finish