version-control

Installation
SKILL.md

Version Control with Git

This skill equips an AI agent to perform the full spectrum of Git-based version control tasks, from initializing a repository and crafting atomic commits to orchestrating branching strategies, resolving merge conflicts, and configuring automation with hooks. It covers both everyday workflows and advanced operations needed for professional team collaboration.

Workflow

  1. Assess Repository State: Run git status, git log --oneline -10, and git branch -a to understand the current branch, uncommitted changes, recent history, and available remotes. This context determines which operations are safe to perform.

  2. Stage and Commit Changes: Group related changes into atomic commits. Write commit messages that start with a concise summary line (50 characters or fewer), followed by a blank line and an explanatory body when the change is non-trivial. Follow the project's commit convention (Conventional Commits, Angular style, etc.) if one exists.

  3. Branch Management: Create feature, bugfix, or release branches from the appropriate base. Use a consistent naming convention such as feat/short-description, fix/issue-123, or release/1.2.0. Delete stale branches after merging to keep the branch list clean.

  4. Synchronize with Remote: Fetch and pull regularly to stay up to date. Push feature branches with the -u flag on first push. Before merging, rebase or merge the base branch into the feature branch to resolve conflicts early in an isolated context.

  5. Resolve Conflicts: When conflicts arise, inspect the conflicting files, understand both sides of the change, choose the correct resolution (or combine both), mark the file as resolved with git add, and complete the merge or rebase. Always run tests after resolution to confirm correctness.

  6. Automate with Hooks and CI: Set up Git hooks (pre-commit for linting/formatting, commit-msg for message validation, pre-push for test runs) and ensure .gitignore covers build artifacts, environment files, and OS metadata. Integrate with CI pipelines to enforce quality gates on every push.

Supported Technologies

Related skills
Installs
10
GitHub Stars
78
First Seen
Mar 19, 2026