(二) gitblit用户使用教程

(一)gitblit安装教程
(二) gitblit用户使用教程
(三) gitblit管理员手册

目录

  • 网页访问
  • git客户端设置
    • 推送错误
    • 配置
    • 查看当前配置
  • 日常使用
    • 仓库分组
    • my profile修改
    • 上传代码简洁

网页访问

(二) gitblit用户使用教程_第1张图片
点击Advanced...
(二) gitblit用户使用教程_第2张图片
点击Accept the Risk and Contiue

初始用户名和密码都是admin,点击login登录.

如果是在机构申请的证书不会出现这个问题.

git客户端设置

推送错误

git push -u origin --all
fatal: unable to access 'https://xxx.xx.xxx.xxx:8443/r/xxxx.git/': server certificate verification failed. CAfile: none CRLfile: none

#本地git不信任certificate
git config --global http.sslverify false
git config --global https.sslverify false

配置

git config --global user.name "myname"
git config --global user.email "[email protected]"
#由于证书根据ip地址生成的,本地git不信任certificate,跳过验证
git config --global http.sslverify false
git config --global https.sslverify false
git config --global branch.autosetuprebase always
git config --global credential.helper store
#解决终端Git中文乱码:200\273\347\273\223
git config --global core.quotepath false
git config --global core.filemode false
#文件换行,提交检出均不转换
git config --global core.autocrlf false

查看当前配置

git config --list

日常使用

仓库分组

Repositories can be grouped within subfolders. e.g. libraries/mycoollib.git and libraries/myotherlib.git

仓库按照项目(project)分组,只有第一级子目录才会分组,第二级子目录不会分组.

新项目创建时,在project中选择/,在name中输入第一级子目录作为项目名称,再加上仓库名称.例如

project_test/testapp1

(二) gitblit用户使用教程_第3张图片在某个项目中增加新的仓库(一个项目可能有许多git仓库组成)时,project选择项目,在name中输入仓库名称
(二) gitblit用户使用教程_第4张图片
第二级目录不会分组
(二) gitblit用户使用教程_第5张图片

my profile修改

preferences中有两个地方修改

![在这里插入图片描述](https://img-blog.csdnimg.cn/41df8671f1d84095beb520a84ac3560b.png#pic_center

上传代码简洁

  • 不要上传中间文件
  • 不要上传镜像,二进制等发布文件,这些文件在svn服务器上传,方便检出.
  • 不要上传sdk等大文件,使用补丁等方式上传.
  • 使用.gitignore过滤上传文件和文件夹
  • 不要在个人仓库,只上传实际项目仓库,时间长了,仓库太多不利于维护.

你可能感兴趣的:(git,git)