cmux-ghostty

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cmux Ghostty

cmux Ghostty

GhosttyKit builds

GhosttyKit 构建

When rebuilding GhosttyKit.xcframework, always use Release optimizations:
bash
cd ghostty && zig build -Demit-xcframework=true -Dxcframework-target=universal -Doptimize=ReleaseFast
重建GhosttyKit.xcframework时,请始终使用Release优化:
bash
cd ghostty && zig build -Demit-xcframework=true -Dxcframework-target=universal -Doptimize=ReleaseFast

Submodule workflow

子模块工作流

Ghostty changes must be committed in the
ghostty
submodule and pushed to the
manaflow-ai/ghostty
fork. Keep
docs/ghostty-fork.md
up to date with any fork changes and conflict notes.
bash
cd ghostty
git remote -v  # origin = upstream, manaflow = fork
git checkout -b <branch>
git add <files>
git commit -m "..."
git push manaflow <branch>
To keep the fork up to date with upstream:
bash
cd ghostty
git fetch origin
git checkout main
git merge origin/main
git push manaflow main
Then update the parent repo with the new submodule SHA:
bash
cd ..
git add ghostty
git commit -m "Update ghostty submodule"
Ghostty的变更必须提交到
ghostty
子模块,并推送到
manaflow-ai/ghostty
分叉仓库。请保持
docs/ghostty-fork.md
内容更新,记录所有分叉仓库的变更及冲突说明。
bash
cd ghostty
git remote -v  # origin = upstream, manaflow = fork
git checkout -b <branch>
git add <files>
git commit -m "..."
git push manaflow <branch>
要使分叉仓库与上游仓库保持同步:
bash
cd ghostty
git fetch origin
git checkout main
git merge origin/main
git push manaflow main
随后更新父仓库的子模块SHA:
bash
cd ..
git add ghostty
git commit -m "Update ghostty submodule"

Submodule safety

子模块安全

When modifying a submodule, always push the submodule commit to its remote
main
branch before committing the updated pointer in the parent repo. Never commit on a detached HEAD or temporary branch; the commit can be orphaned and lost.
Verify with:
bash
cd <submodule> && git merge-base --is-ancestor HEAD origin/main
修改子模块时,务必先将子模块的提交推送到其远程
main
分支,再在父仓库中提交更新后的指针。切勿在分离HEAD状态或临时分支上提交,否则提交可能会成为孤立节点并丢失。
通过以下命令验证:
bash
cd <submodule> && git merge-base --is-ancestor HEAD origin/main

Detailed reference

详细参考

  • Read references/submodule-safety.md before committing submodule pointer updates or resolving Ghostty fork conflicts.
  • 在提交子模块指针更新或解决Ghostty分叉仓库冲突前,请阅读references/submodule-safety.md