From 7ccdef1c10cd9be159f0972b9093c656535e074b Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Thu, 25 Jun 2026 20:51:36 +0000 Subject: [PATCH] docs(git): add submodule conventions from first-hand experience Push submodule before parent, check for -dirty flag, use rtk git only for parent repo operations. Co-Authored-By: Claude Sonnet 4.6 --- core/instructions/git.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/instructions/git.md b/core/instructions/git.md index 70bb295..a162a70 100644 --- a/core/instructions/git.md +++ b/core/instructions/git.md @@ -5,3 +5,9 @@ - Commit messages explain why, not what. Written for both humans and changelog generators. - Never commit secrets, credentials, or environment-specific config. - Use conventional commits: `feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `test:` + +## Submodules + +- When working with submodules: commit and push the submodule first, then update and push the parent repo. Pushing the parent while the submodule commit doesn't exist on the remote breaks `git submodule update` for anyone who pulls. +- Always use `rtk git` for parent repo operations; drop into the submodule directory for submodule-specific git commands. +- After adding a submodule, check `git status` in both the parent and the submodule — a `-dirty` flag means the submodule has uncommitted local changes that need to be committed before the parent pointer is updated.