{"version":"2.1.301","anchor":"git-no-commit-yet-repo-detection-fix","canonical_anchor":"git-no-commit-yet-repo-detection-fix","heading":"Better handling of git repositories with no commits yet","tier":"notice","area":"Git","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301\/e\/git-no-commit-yet-repo-detection-fix","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301","markdown":"### Better handling of git repositories with no commits yet\n\nWhen a git command fails on a branch with no commits yet, Claude Code now treats the branch as having an empty list instead of no answer\n\n**What**\n\nWhen a git command fails, Claude Code now checks which branch is current (with `git symbolic-ref`) and whether it actually exists (with `git show-ref --exists`). A commit is a saved snapshot of the project. If the branch has no commits yet, the result is now an empty list rather than no answer at all.\n\nBefore, this case returned an empty list only when a separate check agreed, and otherwise returned nothing.\n\n**Why**\n\nThis is a small robustness fix for freshly created repositories that have not had their first commit yet.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}