参与Gitlab开源库开发指南

Posted 柳鲲鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了参与Gitlab开源库开发指南相关的知识,希望对你有一定的参考价值。

  泰山信息科技开发了泰山字体引擎,并按照协议开源。与FreeType人员进行了交流,要求使用Gitlab。

  • 注册账号

无法直接注册,吾使用了Github的账号。

  • 安装Github Desktop
  • 参与代码FreeType
https://gitlab.freedesktop.org/freetype/freetype
  • fork一个库

点击fork按钮:

如图操作:

  •  clone
$ git clone https://gitlab.freedesktop.org/quantum6/freetype
  • 设置用户名、邮件

git改变用户名和邮箱_柳鲲鹏的博客-CSDN博客

  •  新建个人SSH Key、Token

git sync fatal: Authentication failed for https://github.com/ did not exit cleanly (exit code 128)_柳鲲鹏的博客-CSDN博客

  • 修改代码(略)
  • 确认状态
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   include/freetype/ftsynth.h
        modified:   src/base/ftsynth.c

no changes added to commit (use "git add" and/or "git commit -a")
  • 提交代码
$ git add .
$ git commit -m "Add a api, someone can oblique by any value"

$ git push --set-upstream origin master
warning: redirecting to https://gitlab.freedesktop.org/quantum6/freetype.git/
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 958 bytes | 958.00 KiB/s, done.
Total 8 (delta 6), reused 0 (delta 0), pack-reused 0
To https://gitlab.freedesktop.org/quantum6/freetype
   15f687349..c0b91c6a7  master -> master
branch 'master' set up to track 'origin/master'.
  • 提交MQ 

以上是关于参与Gitlab开源库开发指南的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Alma Linux 8 上安装 GitLab?

来 GitHub 参与 Jetpack 开源协作!

Gitlab通过MQ提交代码到开源库

gitlab的基本操作--上传下载库的迁移/备份及回收/重命名

使用git和gitlab进行协同开发流程

以赚钱为第一目的的开源,不会走远!