<< All versions
Skill v1.0.1
currentAutomated scan100/100thechandanbhagat/claude-skills/git
1 files
──Details
PublishedSeptember 25, 2026 at 11:39 PM
Content Hashsha256:bca1a67f65f51fa8...
Git SHA9e66a3b5abdf
Bump Typepatch
──Files
Files (1 file, 3.4 KB)
SKILL.md3.4 KBactive
SKILL.md · 192 lines · 3.4 KB
version: "1.0.1" name: git description: Git operations, conflict resolution, history management, and Git workflows. Use for complex Git operations and version control tasks. allowed-tools: Bash
Git Skill
Advanced Git operations and workflows.
1. Branch Management
bash
# Create and switch branchgit checkout -b feature/new-feature# Rename branchgit branch -m old-name new-name# Delete branchgit branch -d feature-branch # Safe deletegit branch -D feature-branch # Force delete# List branchesgit branch -a # All branchesgit branch -r # Remote branches
2. Commit Management
bash
# Amend last commitgit commit --amend -m "New message"# Interactive rebase (last 3 commits)git rebase -i HEAD~3# Cherry-pick commitgit cherry-pick <commit-hash># Revert commitgit revert <commit-hash># Reset (careful!)git reset --soft HEAD~1 # Keep changes stagedgit reset --mixed HEAD~1 # Keep changes unstagedgit reset --hard HEAD~1 # Discard changes
3. Conflict Resolution
bash
# During merge conflictgit status # See conflicted files# Edit conflicted files, then:git add <resolved-file>git commit# Abort mergegit merge --abort# Use specific versiongit checkout --ours <file> # Keep your changesgit checkout --theirs <file> # Use their changes
4. Stash Operations
bash
# Stash changesgit stash save "work in progress"# List stashesgit stash list# Apply stashgit stash apply stash@{0}git stash pop # Apply and remove# Drop stashgit stash drop stash@{0}# Create branch from stashgit stash branch new-branch
5. History and Search
bash
# View historygit log --oneline --graph --allgit log --author="name"git log --since="2 weeks ago"# Search commitsgit log --grep="bug fix"git log -S "function_name" # Search code changes# Show changesgit show <commit-hash>git diff HEAD~1 HEAD# Find when bug introducedgit bisect startgit bisect bad # Current is badgit bisect good <commit-hash> # Test and markgit bisect reset
6. Remote Operations
bash
# Add remotegit remote add origin https://github.com/user/repo.git# Fetch and pullgit fetch origingit pull origin main# Pushgit push origin feature-branchgit push -u origin feature-branch # Set upstream# Delete remote branchgit push origin --delete feature-branch
7. Workflows
Feature Branch Workflow:
bash
git checkout -b feature/new-feature# ... make changes ...git add .git commit -m "Add new feature"git push -u origin feature/new-feature# Create PR, then merge
Git Flow:
bash
# Start featuregit checkout -b feature/name develop# Finish featuregit checkout developgit merge --no-ff feature/namegit branch -d feature/name# Start releasegit checkout -b release/1.0.0 develop# ... prepare release ...git checkout maingit merge --no-ff release/1.0.0git tag -a 1.0.0git checkout developgit merge --no-ff release/1.0.0
8. Useful Aliases
bash
# Add to ~/.gitconfig[alias]st = statusco = checkoutbr = branchci = commitunstage = reset HEAD --last = log -1 HEADlg = log --oneline --graph --all --decorate
9. Cleanup
bash
# Remove untracked filesgit clean -fd# Prune remote branchesgit remote prune origin# Delete merged branchesgit branch --merged | grep -v "\*" | xargs -n 1 git branch -d
When to Use This Skill
Use /git for complex Git operations, conflict resolution, and version control workflows.