KS
Killer-Skills

git-advanced — how to use git-advanced how to use git-advanced, git-advanced worktree tutorial, git-advanced vs git basics, git-advanced install guide, what is git-advanced, git-advanced alternative tools, git-advanced setup for AI agents, git worktree management, git-advanced best practices

v1.0.0
GitHub

About this Skill

Ideal for Version Control Agents needing simultaneous branch management capabilities with Git worktrees. git-advanced is a set of Git tools that includes worktrees, allowing developers to work on multiple branches without stashing or committing work-in-progress.

Features

Creates worktrees for feature branches using `git worktree add` command
Supports creating worktrees with new branches using `-b` option
Lists all worktrees using `git worktree list` command
Removes worktrees after merging using `git worktree remove` command
Enables simultaneous work on multiple branches without stashing or committing
Uses Git commands for efficient branch management

# Core Topics

rohitg00 rohitg00
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
36
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add rohitg00/awesome-claude-code-toolkit/git-advanced

Agent Capability Analysis

The git-advanced MCP Server by rohitg00 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use git-advanced, git-advanced worktree tutorial, git-advanced vs git basics.

Ideal Agent Persona

Ideal for Version Control Agents needing simultaneous branch management capabilities with Git worktrees.

Core Value

Empowers agents to manage multiple Git branches simultaneously using worktrees, avoiding stashing or committing work-in-progress, and supports creating new branches with git worktree add, listing all worktrees with git worktree list, and removing worktrees after merging with git worktree remove.

Capabilities Granted for git-advanced MCP Server

Creating separate worktrees for feature branches
Managing hotfix branches with isolated working directories
Listing and removing worktrees after merging or completion

! Prerequisites & Limits

  • Requires Git version supporting worktrees
  • Limited to local repository management
Project
SKILL.md
4.1 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Git Advanced

Worktrees

bash
1# Create a worktree for a feature branch (avoids stashing) 2git worktree add ../feature-auth feature/auth 3 4# Create a worktree with a new branch 5git worktree add ../hotfix-123 -b hotfix/123 origin/main 6 7# List all worktrees 8git worktree list 9 10# Remove a worktree after merging 11git worktree remove ../feature-auth

Worktrees let you work on multiple branches simultaneously without stashing or committing WIP. Each worktree has its own working directory but shares the same .git repository.

Bisect

bash
1# Start bisect, mark current as bad and known good commit 2git bisect start 3git bisect bad HEAD 4git bisect good v1.5.0 5 6# Git checks out a midpoint commit. Test it, then mark: 7git bisect good # if this commit works 8git bisect bad # if this commit is broken 9 10# Automate with a test script 11git bisect start HEAD v1.5.0 12git bisect run npm test 13 14# When done, reset 15git bisect reset

Bisect performs binary search across commits to find which commit introduced a bug. Automated bisect with run is the fastest approach.

Interactive Rebase

bash
1# Rebase last 5 commits interactively 2git rebase -i HEAD~5 3 4# Common operations in the editor: 5# pick - keep commit as-is 6# reword - change commit message 7# edit - stop to amend the commit 8# squash - merge into previous commit, keep both messages 9# fixup - merge into previous commit, discard this message 10# drop - remove the commit entirely 11 12# Rebase feature branch onto latest main 13git fetch origin 14git rebase origin/main 15 16# Continue after resolving conflicts 17git rebase --continue 18 19# Abort if things go wrong 20git rebase --abort

Git Hooks

bash
1#!/bin/sh 2# .git/hooks/pre-commit 3 4# Run linter on staged files only 5STAGED_FILES=$(git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|tsx|js|jsx)$') 6if [ -n "$STAGED_FILES" ]; then 7 npx eslint $STAGED_FILES --fix 8 git add $STAGED_FILES 9fi
bash
1#!/bin/sh 2# .git/hooks/commit-msg 3 4# Enforce conventional commit format 5COMMIT_MSG=$(cat "$1") 6PATTERN="^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?: .{1,72}$" 7 8if ! echo "$COMMIT_MSG" | head -1 | grep -qE "$PATTERN"; then 9 echo "Error: Commit message must follow Conventional Commits format" 10 echo "Example: feat(auth): add OAuth2 login flow" 11 exit 1 12fi
bash
1#!/bin/sh 2# .git/hooks/pre-push 3 4# Run tests before pushing 5npm test 6if [ $? -ne 0 ]; then 7 echo "Tests failed. Push aborted." 8 exit 1 9fi

Recovery Techniques

bash
1# Undo last commit but keep changes staged 2git reset --soft HEAD~1 3 4# Recover a deleted branch using reflog 5git reflog 6git checkout -b recovered-branch HEAD@{3} 7 8# Recover a file from a specific commit 9git checkout abc1234 -- path/to/file.ts 10 11# Find lost commits (dangling after reset or rebase) 12git fsck --lost-found 13git show <dangling-commit-sha> 14 15# Undo a rebase 16git reflog 17git reset --hard HEAD@{5} # point before rebase started

Useful Aliases

bash
1# ~/.gitconfig 2[alias] 3 lg = log --graph --oneline --decorate --all 4 st = status -sb 5 co = checkout 6 unstage = reset HEAD -- 7 last = log -1 HEAD --stat 8 branches = branch -a --sort=-committerdate 9 stash-all = stash push --include-untracked 10 conflicts = diff --name-only --diff-filter=U

Anti-Patterns

  • Force-pushing to shared branches without --force-with-lease
  • Rebasing commits that have already been pushed and shared
  • Committing large binary files without Git LFS
  • Using git add . without reviewing git diff --staged
  • Not using .gitignore for build artifacts, dependencies, and secrets
  • Keeping long-lived feature branches instead of merging frequently

Checklist

  • Worktrees used for parallel branch work instead of stashing
  • git bisect run automates bug-finding with a test command
  • Interactive rebase cleans up commits before merging to main
  • Pre-commit hooks run linting on staged files
  • Commit message format enforced via commit-msg hook
  • --force-with-lease used instead of --force when force-pushing
  • Reflog consulted before any destructive operation
  • .gitignore covers build outputs, dependencies, and environment files

Related Skills

Looking for an alternative to git-advanced or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication