From 0f2a3fafffaa59ca343176f10ef18f9d7bc7a853 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sun, 15 Feb 2026 15:03:06 -0600 Subject: [PATCH] fix: add .gitkeep to phase directories for git tracking Phase directories created by /gsd:add-phase and /gsd:insert-phase were empty until planning, causing git to ignore them. This prevented syncing across machines. Fixes #427 Co-Authored-By: Claude Opus 4.6 --- get-shit-done/bin/gsd-tools.cjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/get-shit-done/bin/gsd-tools.cjs b/get-shit-done/bin/gsd-tools.cjs index 0eef32dbf..7cba6bd96 100755 --- a/get-shit-done/bin/gsd-tools.cjs +++ b/get-shit-done/bin/gsd-tools.cjs @@ -2653,8 +2653,9 @@ function cmdPhaseAdd(cwd, description, raw) { const dirName = `${paddedNum}-${slug}`; const dirPath = path.join(cwd, '.planning', 'phases', dirName); - // Create directory + // Create directory with .gitkeep so git tracks empty folders fs.mkdirSync(dirPath, { recursive: true }); + fs.writeFileSync(path.join(dirPath, '.gitkeep'), ''); // Build phase entry const phaseEntry = `\n### Phase ${newPhaseNum}: ${description}\n\n**Goal:** [To be planned]\n**Depends on:** Phase ${maxPhase}\n**Plans:** 0 plans\n\nPlans:\n- [ ] TBD (run /gsd:plan-phase ${newPhaseNum} to break down)\n`; @@ -2725,8 +2726,9 @@ function cmdPhaseInsert(cwd, afterPhase, description, raw) { const dirName = `${decimalPhase}-${slug}`; const dirPath = path.join(cwd, '.planning', 'phases', dirName); - // Create directory + // Create directory with .gitkeep so git tracks empty folders fs.mkdirSync(dirPath, { recursive: true }); + fs.writeFileSync(path.join(dirPath, '.gitkeep'), ''); // Build phase entry const phaseEntry = `\n### Phase ${decimalPhase}: ${description} (INSERTED)\n\n**Goal:** [Urgent work - to be planned]\n**Depends on:** Phase ${afterPhase}\n**Plans:** 0 plans\n\nPlans:\n- [ ] TBD (run /gsd:plan-phase ${decimalPhase} to break down)\n`;