Skip to content

docs: document linear git history - #221

Merged
tt-a1i merged 3 commits into
openpi-dev:mainfrom
somewan820:docs/git-linear-history
Aug 28, 2026
Merged

tt-a1i merged 3 commits into
openpi-dev:mainfrom
somewan820:docs/git-linear-history

Conversation

@somewan820

@somewan820 somewan820 commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The repository currently permits merge commits, so pull requests can add unnecessary branch topology to main. Contributors and maintainers also lack one documented workflow for preparing and merging a linear pull request.

Value

A shared fast-forward and linear-history policy makes the project log easier to inspect, bisect, and use for release tracking. It also gives maintainers an explicit default for removing intermediate development commits.

Approach

Add an English contribution guide that documents:

  • the recommended GitHub linear-history and merge-method settings;
  • rebasing a topic branch onto the latest main;
  • safe updates with --force-with-lease;
  • defaulting multi-commit PRs to Squash and merge, with Rebase and merge as a reviewed exception;
  • GitHub CLI equivalents guarded by --match-head-commit; and
  • fast-forward-only local updates after a merge.

The guide explicitly does not propose rewriting already published history.

Validation

  • git diff --check
  • bun run check (passed; existing Effect warnings only)
  • bun run test (Node 928/928, Vitest 30/30)

Impact

Documentation only. No user-visible runtime behavior, model-visible context or tools, lifecycle behavior, persisted data, or compatibility changes.

@somewan820
somewan820 force-pushed the docs/git-linear-history branch 2 times, most recently from 936888d to 742676a Compare August 28, 2026 07:30
@somewan820
somewan820 requested a review from tt-a1i August 28, 2026 07:35

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. CI is green on the reviewed head, but the guide currently contains a reproducible destructive update path and policy/configuration inconsistencies. Please also add a discoverable contributor entry point (for example, a root CONTRIBUTING.md or links from README.md/docs/README.md plus a category index); otherwise the stated workflow remains difficult for contributors to find. Current repository settings still allow merge commits and main does not require linear history, so this documentation-only PR should not imply that enforcement is already active.

Comment thread docs/contributing/linear-git-history.md Resolved
Comment thread docs/contributing/linear-git-history.md Resolved
Comment thread docs/contributing/linear-git-history.md Resolved
@somewan820
somewan820 requested a review from tt-a1i August 28, 2026 10:49
Comment thread docs/contributing/linear-git-history.md Resolved

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

入口可发现性、当前 GitHub 设置说明、Squash/Rebase 规则、显式 lease 和 ff-only 更新都已修好;但 pushed-branch 示例仍会把正常 rebase 后作者自己的旧提交当成协作者新增提交,导致文档推荐的标准流程无法继续。请按行级评论调整远端 tip 的捕获时序。git diff --check、bun run check 和远端两路 CI 均通过;PR 仍落后 main。

@tt-a1i
tt-a1i force-pushed the docs/git-linear-history branch from 3aaf22a to 2dd6836 Compare August 28, 2026 17:18

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review on 2dd6836: the pushed-branch sequence now captures the exact remote tip before rebasing, compares it with the live remote tip after rewriting, and uses that pre-rebase SHA as the explicit lease. Normal rebase no longer misclassifies the author’s old commits, while concurrent remote updates still fail closed. The branch is current with main. Local bun run check passed; full suite passed with 941 Node and 30 Vitest tests. Remote Node 22.19 and Node 24 CI both passed.

@tt-a1i
tt-a1i merged commit 0ff3263 into openpi-dev:main Aug 28, 2026
2 checks passed
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 29, 2026
* docs: document linear git history

* docs: address linear history review

* docs: fix rebased branch update sequence

---------

Co-authored-by: tt-a1i <[email protected]>
(cherry picked from commit 0ff3263)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants