From 673ae5294fc4e68d1c4cb171495efb0c2ab931d8 Mon Sep 17 00:00:00 2001 From: numachang Date: Sat, 23 May 2026 19:00:24 +0900 Subject: [PATCH 1/2] docs: Note `gh repo set-default` to keep `gh pr create` on the fork Twice we have accidentally opened a PR against upstream `zmkfirmware/zmk-studio` (closed PRs #172, #173) because `gh pr create` defaults to the parent repo when `origin` is a fork. `gh repo set-default` writes a local-only `.git/config` entry that flips that default to this fork. Documenting it under branch operations so future clones do not re-trip the same wire. Co-Authored-By: Claude --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 5141ccaa..c1e0d289 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,6 +59,7 @@ - `main` への直 push は避ける。機能ブランチを切る: `feature/` または `chore/`。 - PR ベースで `main` に入れる(self-merge でも PR を経由)。 +- **clone 後に一度だけ** `gh repo set-default numachang/zmk-studio-tweaks` を実行する。`gh pr create` は何も指定しないと **upstream を base に取りに行く**(過去 2 回、誤って `zmkfirmware/zmk-studio` に PR が立った)。set-default はローカル `.git/config` のみ書き換え、push されない。 ### コミット From c294029964281cffc70afd5a88a2faead85328d7 Mon Sep 17 00:00:00 2001 From: numachang Date: Sat, 23 May 2026 19:03:06 +0900 Subject: [PATCH 2/2] docs: Never let personal-fork changes land in upstream PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fork-internal mistake of opening PRs against `zmkfirmware/zmk-studio` (closed #172, #173) reflects a deeper rule that should be stated explicitly: personal-convenience changes — deploy config for our own hosting, locale tweaks, fork-only preferences — must never reach upstream. Anything we send to upstream must be broadly useful to its users, not just to us. Co-Authored-By: Claude --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index c1e0d289..bee0a666 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,6 +14,7 @@ このフォークは、ZMK プロジェクトの善意の上に成り立っています。次のことを必ず守ってください。 +- **「自分のための更新」は、決して upstream を汚さない**: 個人ページへのデプロイ設定、ローカル環境固有の tweak、フォーク限定の好みなど、**上流の利用者一般に価値が無い/関係しない変更**は、絶対に upstream リポジトリへ PR してはいけない。upstream に投げるのは「上流のユーザに広く意味のある変更」だけ。過去 2 回(closed [PR #172](https://github.com/zmkfirmware/zmk-studio/pull/172) / [PR #173](https://github.com/zmkfirmware/zmk-studio/pull/173))この線を越えた。`gh pr create` を打つ前に base が `numachang/zmk-studio-tweaks` であることを毎回確認する。 - **クレジットを残す**: README / コミットメッセージ / PR 説明で、上流 (`zmkfirmware/zmk-studio`, Apache-2.0) への謝意とリンクを明示する。 - **上流をネガティブに書かない**: 「公式が遅いから」「メンテナが対応しないから」といったニュアンスは避ける。フォークの動機は「個人的な使い勝手の追求」として記述する。 - **upstream に還元する姿勢を保つ**: 機能ができたら upstream にも PR を投げる。取り込まれなくても、投げたという事実が大事。