Git changing author info

参考:
Error “Your push would publish a private email address”
How to amend several commits in Git to change author
Changing author info

在 Gitlab CI 中创建 Tag

从 Gitlab 13.2 开始提供支持,在此之前需要使用 token 调用 api 的方式创建,并且在 push 时跳过 CI 执行,还是挺麻烦的。

参考:
Tag creation in pipelines
Avoid additional pipeline run when creating new tags in a pipeline
Push Options
GitLab CI/CD pipeline configuration reference – workflowrules
GitLab CI/CD pipeline configuration reference – release

git cherry-pick (摘樱桃)的功能和缺陷

简单来说,功能是直接从分支A,复制某次提交及其之后的记录到分支B中,并不会留下合并记录。
缺陷是,由于没有合并记录,分支A和分支B在经过各自一系列的提交之后,再进行合并时,分支合并算法会基于最近的共同基点(在cherry-pick 操作之前),此时合并结果可能会直接使用错误的版本,且不会有冲突提示

参考资料:
git cherry-pick 教程
Stop cherry-picking, start merging: Index
Stop cherry-picking, start merging, Part 1: The merge conflict
Stop cherry-picking, start merging, Part 2: The merge conflict that never happened (but should have)
Stop cherry-picking, start merging, Part 3: Avoiding problems by creating a new merge base