references/submodule-safety.md
228 tokens · o200k_base · 1,015 bytes
Submodule Safety
The parent repository records only a commit SHA, not the branch that makes the SHA reachable, so submodule commits are easy to lose.
Safe sequence
- Enter the submodule.
- Create or select the intended branch (never a detached HEAD).
- Commit the submodule changes.
- Push to the remote that hosts the fork.
.gitmodulespoints every submodule atmanaflow-ai/*, so that is normallyorigin; rungit remote -vto confirm before pushing. - Verify the pushed branch contains the commit, checking the branch you actually pushed rather than always
main:git merge-base --is-ancestor HEAD <remote>/<branch>. - Return to the parent repository and commit the updated pointer.
Skipping step 4 or 5 produces a parent commit pointing at an orphaned SHA that a future checkout or CI job cannot fetch.
Fork documentation
Keep docs/ghostty-fork.md updated when fork changes or conflict notes matter for a future upstream merge. Record why the fork diverged, not just that it did.