speckit-git-initialize

Initializes a Git repository with an initial commit in spec-kit projects.

Updated Jan 28, 2024
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-initialize-thiago-cruz-eng
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-initialize
Source: https://github.com/Thiago-Cruz-eng/KrockSide/tree/main/.claude/skills/speckit-git-initialize
Command: npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-initialize-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up version control is a required first step for any spec-kit project, but manually running Git commands and handling edge cases like missing Git installations or existing repositories adds friction. This Skill automates repository initialization with built-in safety checks. ## Core Features & Use Cases - Automated Git Initialization: Runs git init, git add ., and an initial commit through dedicated Bash or PowerShell scripts. - Idempotent and Safe: Skips initialization if Git is unavailable or if the directory is already inside a Git repository. - Graceful Degradation: Warns and continues without Git when it is not installed, so spec creation under specs/ still works. - Use Case: After scaffolding a new spec-kit project with a .specify/ directory, invoke this Skill to immediately place the project under version control with a clean initial commit. ## Quick Start Initialize a Git repository with an initial commit in my current spec-kit project directory.

Frequently Asked Questions about speckit-git-initialize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize a Git repository in a spec-kit project?▼

Run the initialization script from the project root: .specify/extensions/git/scripts/bash/initialize-repo.sh on Bash or the PowerShell equivalent. If scripts are missing, fall back to git init, git add ., and git commit with an initial message.

What happens if I run git init in an existing repository?▼

The initialization script checks whether the directory is already inside a Git repository and skips initialization in that case. This prevents accidental re-initialization or nested repository issues.

Does this work if Git is not installed on my machine?▼

Yes, it degrades gracefully. The script warns the user and skips repository initialization, and the project continues to function since specs can still be created under the specs/ directory without version control.

Can I customize the initial Git setup with gitignore or hooks?▼

Yes, you can replace the initialization script to add custom .gitignore templates, default branch naming, Git LFS setup, Git hooks installation, commit signing, or Git Flow initialization.

Why does git initialization fail after git init succeeds?▼

If git add or git commit fails after init, the error is surfaced to the user and the command stops rather than continuing with a partially initialized repository. Common causes include missing user.name or user.email Git configuration.