@mohshomis/ckpt 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/core.js +4 -0
  2. package/package.json +1 -1
package/dist/core.js CHANGED
@@ -77,6 +77,10 @@ export function startSession(cwd) {
77
77
  if (existing) {
78
78
  throw new Error(`Session already active (${existing.id}). Run "ckpt end" or "ckpt end --discard" first.`);
79
79
  }
80
+ // If repo has no commits yet, create an initial one
81
+ if (!gitSafe('rev-parse HEAD', cwd)) {
82
+ git('commit --allow-empty -m "initial commit"', cwd);
83
+ }
80
84
  const status = git('status --porcelain', cwd);
81
85
  if (status) {
82
86
  git('stash push -m "ckpt: auto-stash before session"', cwd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohshomis/ckpt",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Automatic checkpoints for AI coding sessions. Per-step undo, branching, and restore — on top of git.",
5
5
  "type": "module",
6
6
  "bin": {