git-workflow

Manage Git branching strategies and worktree creation for isolated development tasks.

Updated Dec 22, 2024
One-click install
npx skills add https://github.com/lvstb/nix-config --skill git-workflow-lvstb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/lvstb/nix-config/tree/main/home/opencode/skills/git-workflow
Command: npx skills add https://github.com/lvstb/nix-config --skill git-workflow-lvstb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of managing Git branches and worktrees, making it easier to isolate development tasks, handle complex features, and cleanly finish your work.

Core Features & Use Cases

  • Branch Creation: Start new development branches using either Git worktrees (recommended for larger tasks) or regular branches.
  • Dependency Management: Automatically detects and installs project dependencies based on common package managers.
  • Branch Finishing: Provides clear options and commands for merging, creating Pull Requests, keeping branches, or discarding them, ensuring a clean Git history.
  • Use Case: When starting a significant new feature, use this Skill to create an isolated worktree, develop the feature, commit incrementally, and then present options to merge it into the main branch or create a Pull Request.

Quick Start

Use the git-workflow skill to create a new worktree for a feature named 'new-login-flow' on a branch called 'feature/new-login-flow'.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
How do I manage Git branches for a new feature without disrupting the main codebase?

Git branch management isolates new features by creating dedicated development branches or worktrees. This approach keeps your main codebase clean and allows you to develop features independently before merging or creating a pull request.

When should I use Git worktrees instead of regular branches for development?

Git worktrees are recommended for medium to large development efforts requiring isolation. They allow you to maintain multiple working directories from a single repository, preventing branch switching overhead during complex tasks.

How do I finish a Git branch and merge changes back to the main baseline?

To finish a Git branch, you can execute branch-finishing procedures like merging, creating pull requests, or discarding changes. This ensures a clean Git baseline and maintains conventional commit practices.

Can I automatically install project dependencies when creating a new Git worktree?

Yes, branch creation automatically detects and installs project dependencies based on common package managers. This streamlines the setup process so you can start coding immediately after isolating your development task.

What is the best way to discard changes on a feature branch and keep my Git history clean?

To discard changes and keep Git history clean, use branch-finishing procedures that provide specific commands for discarding work. This ensures your repository baseline remains uncluttered by unwanted development efforts.