如果对你有帮助, 请点击💖喜欢💖鼓励一下我这个臭弟弟
一.环境介绍
Eclipse mars + eclipsegit + gitlab
二.操作
1.登录gitlab,创建新项目



上图中箭头所指内容就是远程仓库的地址
2.在eclipse中克隆远程仓库,创建本地仓库[git repositories视图]


↑只要填写了URI, Host和Repository path会自动补充.[user和password来自gitlab注册时]

↑选择本地仓库的位置

↑当当当~到这一步就算是成功一半了~~
3.创建新项目,以普通的java项目为例

4.上传项目到远程仓库
项目右击,选择teamàshare project



↑选择本地仓库
操作完成之后,项目会变成如下的样子:

然后在项目右击,选择teamàcommit,打开git staging视图,

将需要提交的文件从unstaged changes区域拖放到staged
changes区域,填写commit message,
author和committer是自己的gitlab上的账号,格式是username ,在安装git的教程中一般都会有这个的配置,可自行搜索.
如果手动选择拖动要提交的文件嫌麻烦的话,可以自定义.gitignore文件,自行百度~~
最后的最后,点击commit and push,就可以提交了~~

↑因为是初提,所以会出这个对话框,一路next, finish就可以了
5.在gitlab中查看自己提交的项目

已经粗线啦~ ok,到此结束
如果对你有帮助, 请点击💖喜欢💖鼓励一下我这个臭弟弟
网友评论