speckit-git-initialize

Initialize a Git repository with an initial commit for Spec-Kit projects.

80|21|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/alfredoperez/speckit-companion --skill speckit-git-initialize-alfredoperez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-initialize
Source: https://github.com/alfredoperez/speckit-companion/tree/main/.agents/skills/speckit-git-initialize
Command: npx skills add https://github.com/alfredoperez/speckit-companion --skill speckit-git-initialize-alfredoperez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of initializing a Git repository, ensuring that the repository is set up correctly with an initial commit.

Core Features & Use Cases

  • Automated Initialization: Initializes a Git repository in the current project directory if one does not already exist.
  • Compatibility: Requires a Spec-Kit project structure with a .specify/ directory.
  • Customization: Allows for the replacement of scripts to add project-specific Git initialization steps, such as custom .gitignore templates, default branch naming, and Git LFS setup.

Quick Start

Run the initialize-repo.sh script from the project root to initialize the Git repository.

Frequently Asked Questions about speckit-git-initialize

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

FAQPage Schema
How do I automate Git repository initialization with an initial commit?

Automate Git repository initialization by running the `initialize-repo.sh` script from the project root to set up the repository and create the initial commit. The script checks for Git availability and existing repositories before executing initialization commands internally.

What is the required project structure for initializing a Git repository with Spec-Kit?

Initializing a Git repository with Spec-Kit requires a specific project structure containing a `.specify/` directory. The automation checks for this structure before proceeding with the repository initialization and initial commit process.

Can I customize Git initialization steps like .gitignore templates and default branch naming?

Customize Git initialization steps by replacing scripts to add project-specific configurations such as custom `.gitignore` templates, default branch naming, and Git LFS setup. The Skill supports these customizations during the repository initialization process.

Does Git repository initialization work if a repository already exists in my project directory?

Git repository initialization does not proceed if an existing repository is detected in the current project directory. The automation performs checks for existing repositories and only initializes a new Git repository if one does not already exist.

What happens if Git is not installed when I try to initialize a repository?

The repository initialization script performs checks for Git availability before attempting to set up the repository. If Git is not found on the system, the initialization process will not execute, preventing errors during the setup of your Spec-Kit project.

Why does my Spec-Kit repository initialization fail without a .specify directory?

Spec-Kit repository initialization requires a `.specify/` directory in the project structure because the automation is designed specifically for this setup. Without the `.specify/` directory, the initialization script cannot properly configure and commit the Spec-Kit project.