# Nested Git Repo Stash Safety

> How to safely stash changes in a parent repo containing dirty nested git repositories

- Skill: `vamseeachanta/nested-git-repo-stash-safety` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/nested-git-repo-stash-safety`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/nested-git-repo-stash-safety/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/nested-git-repo-stash-safety

---


# Nested Git Repo Stash Safety

When a parent repo contains a nested git repository (gitlink pointer), `git stash` in the parent only captures the SHA pointer to the nested repo, not the nested repo's actual working-tree changes. Modified files inside the nested repo are invisible to the parent's stash and will survive or be left behind unpredictably. Always manually snapshot or stash changes inside nested repos separately before performing parent-repo operations. Use `git status` to detect `m` (modified gitlink) entries indicating a dirty nested repo state.
