一、参考资料及官方教程
GitLab 服务器下客户端TortoiseGit配置和使用教程 - 推酷
GitLab使用总结 - 怀素的专栏 - 博客频道 - CSDN.NET
Git与TortoiseGit基本操作 - 在路上。。。 - 博客频道 - CSDN.NET
二、按以上教程的操作步骤记录
1、设置用户名和邮箱,按教程(我的git是以前装好的)

查看产生的文件

2、安装客户端,按照教程
3、公司地址如下,输入用户名和密码登入,单击左侧SSH Keys

4、用记事本打开C:\Users\xmin\.ssh\id_rsa.pub,将其文件内容,全部复制到Key输入框中。Title建议为电子邮件地址(复制完Key后,会自动填充为Email地址)。单击按钮Add Key。此时,你将拥有一个SSH Key,以后,在操作Git时,系统会自动使用私钥id_rsa来与服务器上的公钥进行认证匹配。如下图;

5、在打算放程序的文件夹内右键选择Git Clone,URL中填下图中复制的SSH,否则会出git did not exit cleanly (exit code 128)”错误

参考链接tortoriseGit的使用 - mokal同学 - 博客园
git did not exit cleanly (exit code 128)的解决方案 - 蓝斯的专栏 - 博客频道 - CSDN.NET
git did not exit cleanly (exit code 128)的解决方案 - IT之路的博客 - 博客频道 - CSDN.NET
6、成功

二、私有GitLab地址
三、AndroidStudio行使用gitLab参考
GitLab/Git在AndroidStudio上的使用 - 怀素的专栏 - 博客频道 - CSDN.NET
四、如何提交更新
选中项目,右键Git Commit-->"master"


单击commit&push
如果无法提交上去,可以按下面操作一下,重新提交
1,选中项目,右键tortoriseGit-->pull

2,选中项目,右键
-->push
五、新建branch
在poc_android_sdk文件夹内右键

新建分支

可以把自动连接的代码写好后先传到autoConnect分支

转换分支
六、UI已更新,但我这边却无法pull下来
查看日志

查看setting

Putty Key 为空

解决方案:
1、登入:Sign in · GitLab
2、单击remove删除以前的Key

3、单击Add SSH Key按二、3,4操作重新产生
就可以用啦
4、用puTTy key Generator产生公钥


保存公钥和私钥到目录C:\Users\xmin\.ssh下

七、新开了全部代码的git权限给我
1、登入公司私有GitLab地址
2、看到全部代码(UI+SDK)
点击进入,复制SSH,新建文件夹cgm,在文件夹内右键:git clone

就把全部代码clone下来了。
八、新建分支develop-crosstime,最后merge到devlop


转到develop-crosstime分支进行提交和修改

九、master只作发布用,稳定下来才会合并到master,develop用来开发更新
在C:\2016-2017\20160608Doctor.R\cgm\poc_android
内右键,操作同上:
本地删了从服务器重新clone,基于develop分支新建分支develop-resend-fix
,转到develop-resend-fix后显示下图,直接单击close即可,merge,commit,push都不用选

网友评论