Skip to content

How do I develop Memos|我如何开发 Memos #8

Description

@chriscurrycc

Update on 2025-03-02

I've decided to stop synchronizing with the official Memos:

  1. The official Memos updates rapidly, and I lack the energy for regular merges and code reviews.
  2. The official Memos uses a Combine/Rebase strategy for PRs, leading to significant conflicts due to differing commit records.
  3. Features I submit to the official Memos may later be removed or altered, which adds substantial review costs if I try to sync.

This project will become my personal project, developed from Memos v0.23.0. After two months, Memos has fully replaced flomo. I will continue to invest time in this project, but solely on my version. I will also reference important updates from the official Memos while implementing my desired features.

I will currently accept third-party bug reports, which I will prioritize resolving, but I will not accept feature issues unless I plan to use them myself.


最终我还是决定放弃和官方的 Memos 保持同步:

  1. 官方 Memos 迭代速度快,自己没有精力去进行定期合并、Review 代码
  2. 官方 Memos 接纳 PR 采取的是 Combine/Rebase 的策略,commit 记录和我不一样,每次合并产生大量冲突
  3. 我提交到官方 Memos 的功能,后期可能会去掉或者改造,如果要同步,这反过来给我的 Review 也带来了大量成本

这个项目最终会成为我个人的项目,基于 Memos v0.23.0 开发,经历了 2 个月,Memos 已经彻底替代 flomo,我后期仍然会花时间在这个项目上,但只会把精力花费在自己这个版本上。当然,也会参考官方 Memos 一些重要的迭代进行开发,同时实现我自己想要的功能。

我自己的仓库目前只接受第三方的 BUG 提交,我会花时间解决,不接收功能 issue,除非我自己也会使用。

Original Version

Memos is an excellent open-source project. While contributing to open-source, I also do some personalized customization. To differentiate between personalized aspects and official Memos contributions (such as bug fixes, adding common features, etc.), I impose some constraints and explanations on the process.

There are two branches:

  • Main: My latest codebase and my personal memo system built on it.
  • Upstream: Consistent with the latest version of the official repository.

For bug fixes or common features:

  1. Checkout a development branch from upstream.
  2. After development is complete, initiate a PR to the official main branch.
  3. My personal main branch will directly merge the code of this development branch.
  4. If the PR is accepted, delete the development branch.
  5. If the PR is rejected, also delete the development branch, indicating that it is more suitable as my personalized part.

For personalized modifications, make changes directly on the main branch.

How to merge code from the official repository?

  1. After the official release of new versions (including test versions), I will merge it directly into the upstream branch.
  2. After the official release of stable version, apart from merging it into the upstream branch, I will also merge it into the main branch. For conflicting parts, I will evaluate before deciding whether to adopt them and document the decisions in issues.

This ensures that I can meet my personalization needs, contribute to the community, and benefit from community contributions.


Memos 是一个很优秀的开源项目,在参与开源贡献的同时,我也会做一些个性化的定制。为了将个性化的部分和对官方 Memos 贡献(例如修复 bug、新增一些通用 feature 等等)区分开来,我在此对流程上做一些约束和说明。

分支很简单,就两个:

  • main 分支:我的最新代码分支,我自己的系统会基于 main 的代码
  • upstream 分支:与官方仓库的最新版本代码一致

如果是 bug 修复或通用 feature:

  1. 从 upstream 切出来一个开发分支进行开发
  2. 开发完成后向官方 main 分支发起 PR
  3. 个人 main 分支会直接合并这个开发分支的代码
  4. 如果 PR 接受,删除该开发分支
  5. 如果 PR 被拒绝,也删除该开发分支,表明这个更适合作为我个性化的部分

如果是个性化修改,则直接在 main 分支上进行。

如何合并官方仓库的代码?

  1. 官方发布新版本(含测试版)代码后,我会将其直接合并到 upstream 分支
  2. 官方发布稳定版本代码后,除了合并到 upstream 分支,我还会将其合并到 main 分支,对于冲突的部分,我会评估后再决定是否采用,并记录到文档 issue 中

以上基本能保证在满足我的个性化的同时,也能参与社区贡献,以及吸收来自社区的贡献。

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions