sickn33/antigravity-awesome-skills/git-advanced-workflows
- community
Checking that the SKILL.md file is still in the repository.
Master advanced Git techniques to maintain clean history, collaborate effectively, and recover from any situation with confidence.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/git-advanced-workflowsSKILL.md
Git Advanced Workflows
Master advanced Git techniques to maintain clean history, collaborate effectively, and recover from any situation with confidence.
Do not use this skill when
- The task is unrelated to git advanced workflows
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
When to Use
- Cleaning up commit history before merging
- Applying specific commits across branches
- Finding commits that introduced bugs
- Working on multiple features simultaneously
- Recovering from Git mistakes or lost commits
- Managing complex branch workflows
- Preparing clean PRs for review
- Synchronizing diverged branches
Repository and Recovery Boundary
Read repository instructions and branch protection first. A hotfix follows the protected PR/maintainer path when required; urgency does not authorize a direct default-branch commit or push. Preserve dirty and staged work before checkout, rebase, reset or restore. A backup branch protects committed history only, not uncommitted files. Inspect exact targets before destructive operations and obtain authorization for shared-history rewrites. Reflog availability depends on local expiry and garbage collection; it cannot guarantee recovery of every lost file.
Core Concepts
1. Interactive Rebase
Interactive rebase is the Swiss Army knife of Git history editing.
Common Operations:
pick: Keep commit as-isreword: Change commit messageedit: Amend commit contentsquash: Combine with previous commitfixup: Like squash but discard messagedrop: Remove commit entirely
Basic Usage:
2. Cherry-Picking
Apply specific commits from one branch to another without merging entire branches.
3. Git Bisect
Binary search through commit history to find the commit that introduced a bug.
Automated Bisect:
4. Worktrees
Work on multiple branches simultaneously without stashing or switching.
5. Reflog
Your safety net - tracks all ref movements, even deleted commits.
Practical Workflows
Workflow 1: Clean Up Feature Branch Before PR
Workflow 2: Apply Hotfix to Multiple Releases
Workflow 3: Find Bug Introduction
Workflow 4: Multi-Branch Development
Workflow 5: Recover from Mistakes
Advanced Techniques
Rebase vs Merge Strategy
When to Rebase:
- Cleaning up local commits before pushing
- Keeping feature branch up-to-date with main
- Creating linear history for easier review
When to Merge:
- Integrating completed features into main
- Preserving exact history of collaboration
- Public branches used by others
Autosquash Workflow
Automatically squash fixup commits during rebase.
Split Commit
Break one commit into multiple logical commits.
Partial Cherry-Pick
Cherry-pick only specific files from a commit.
Best Practices
- Authorized Rewrites Only: Use an explicit expected remote SHA with a lease for an authorized topic-branch rewrite; a lease is not permission to rewrite shared history
- Rebase Only Local Commits: Don't rebase commits that have been pushed and shared
- Descriptive Commit Messages: Future you will thank present you
- Atomic Commits: Each commit should be a single logical change
- Test Before Force Push: Ensure history rewrite didn't break anything
- Keep Reflog Aware: Remember reflog is a local recovery aid with configurable expiry; unreachable entries may expire sooner
- Branch Before Risky Operations: Create backup branch before complex rebases
Common Pitfalls
- Rebasing Public Branches: Causes history conflicts for collaborators
- Force Pushing Without Lease: Can overwrite teammate's work
- Losing Work in Rebase: Resolve conflicts carefully, test after rebase
- Forgetting Worktree Cleanup: Orphaned worktrees consume disk space
- Not Backing Up Before Experiment: Always create safety branch
- Bisect on Dirty Working Directory: Commit or stash before bisecting
Recovery Commands
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git-advanced-workflows/SKILL.md
Popularity
- Repository stars
- 30,228
- Repository forks
- 5,051
- Repository npm downloads, 7 days
- 13,631
- 7-day trend score
- 73
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 3 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/git-advanced-workflows)