[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EM9T5HK3F2G7RT68BKQFMZ":3,"skill-same:01M6EM9T5HK3F2G7RT68BKQFMZ":117},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6EM9T5HK3F2G7RT68BKQFMZ","git-advanced",null,"Advanced Git operations and workflows including interactive rebasing, conflict resolution, history manipulation, bisecting for bugs, cherry-picking, reflog recovery, and branch management strategies. Use for: (1) Interactive rebasing and commit cleanup, (2) Complex merge conflict resolution, (3) Git bisect for bug hunting, (4) History rewriting and cleanup, (5) Branch strategy implementation (Git Flow, trunk-based), (6) Recovering lost commits with reflog","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"git","git advanced","strategy","git operations","resolution","conflict","strategies","bug","conflict resolution","use","interactive","workflows","branch","history","commits","recovery","flow","cleanup","merge","commit","2026-11-10 10:12:30",false,"---\nname: git-advanced\ndescription: \"Advanced Git operations and workflows including interactive rebasing, conflict resolution, history manipulation, bisecting for bugs, cherry-picking, reflog recovery, and branch management strategies. Use for: (1) Interactive rebasing and commit cleanup, (2) Complex merge conflict resolution, (3) Git bisect for bug hunting, (4) History rewriting and cleanup, (5) Branch strategy implementation (Git Flow, trunk-based), (6) Recovering lost commits with reflog\"\n---\n\n# Advanced Git Operations\n\n## Overview\n\nMaster advanced Git workflows for complex version control scenarios. This skill covers sophisticated operations beyond basic commits and merges, including interactive rebasing, advanced conflict resolution, history manipulation, and strategic branch management.\n\nUse this skill when you need to:\n- Clean up messy commit history before code review\n- Resolve complex merge conflicts strategically\n- Hunt down bugs with binary search (bisect)\n- Recover lost commits or undo mistakes\n- Implement team branching strategies\n- Rewrite history safely\n\n## Core Capabilities\n\n### Interactive Rebasing\n- Reorder commits for logical history\n- Squash multiple commits into one\n- Edit commit messages retroactively\n- Split commits into smaller pieces\n- Remove unwanted commits from history\n\n### Conflict Resolution\n- Strategic merge conflict handling\n- Three-way merge understanding\n- Ours vs theirs strategy selection\n- Conflict marker interpretation\n- Partial file staging during conflicts\n\n### Git Bisect\n- Binary search for bug introduction\n- Automated bisect with scripts\n- Good\u002Fbad commit identification\n- Efficient debugging of regressions\n\n### History Manipulation\n- Amend commits safely\n- Filter-branch operations\n- BFG Repo-Cleaner for large files\n- Rewrite history with caution\n- Preserve attribution and dates\n\n### Branch Strategies\n- Git Flow workflow\n- Trunk-based development\n- Feature branch workflows\n- Release branch management\n- Hotfix procedures\n\n## Quick Command Reference\n\n### Interactive Rebase\n```bash\n# Rebase last 5 commits interactively\ngit rebase -i HEAD~5\n\n# Rebase onto main branch\ngit rebase -i main\n\n# Continue after resolving conflicts\ngit rebase --continue\n\n# Abort and return to original state\ngit rebase --abort\n```\n\n### Conflict Resolution\n```bash\n# Accept ours (current branch)\ngit checkout --ours \u003Cfile>\n\n# Accept theirs (incoming branch)\ngit checkout --theirs \u003Cfile>\n\n# List conflicted files\ngit diff --name-only --diff-filter=U\n\n# Mark as resolved\ngit add \u003Cfile>\n```\n\n### Git Bisect\n```bash\n# Start bisect session\ngit bisect start\ngit bisect bad\ngit bisect good \u003Ccommit-hash>\n\n# Automate with test script\ngit bisect run .\u002Ftest-script.sh\n\n# End bisect session\ngit bisect reset\n```\n\n### Cherry-Pick\n```bash\n# Apply specific commit\ngit cherry-pick \u003Ccommit-hash>\n\n# Cherry-pick without committing\ngit cherry-pick -n \u003Ccommit-hash>\n\n# Cherry-pick range of commits\ngit cherry-pick A^..B\n```\n\n### Reflog Recovery\n```bash\n# View reflog history\ngit reflog\n\n# Recover lost commit\ngit checkout -b recovery \u003Ccommit-hash>\n\n# Reset to previous state\ngit reset --hard HEAD@{2}\n```\n\n## Core Workflows\n\n### 1. Interactive Rebase Workflow\n\n**When to Use:**\n- Clean up messy commit history before pushing\n- Combine \"WIP\" or \"fix typo\" commits\n- Reorder commits for logical progression\n- Split large commits into focused changes\n\n**Steps:**\n\n```bash\n# 1. Start interactive rebase for last N commits\ngit rebase -i HEAD~5\n\n# Interactive editor opens with commit list\n# Modify commands to reorganize history\n```\n\n**Rebase Commands:**\n- `pick` (p): Keep commit as-is\n- `reword` (r): Keep commit, edit message\n- `edit` (e): Keep commit, stop to amend\n- `squash` (s): Combine with previous commit, keep message\n- `fixup` (f): Combine with previous commit, discard message\n- `drop` (d): Remove commit entirely\n\n**Example:**\n```bash\n# Before\npick abc1234 Add feature X\npick def5678 Fix typo\npick ghi9012 WIP commit\npick jkl3456 Update documentation\n\n# After cleanup\npick abc1234 Add feature X\nfixup def5678 Fix typo\ndrop ghi9012 WIP commit\nreword jkl3456 Update documentation\n```\n\n**Safety Tips:**\n- Never rebase commits already pushed to shared branches\n- Create backup branch: `git branch backup`\n- Use `git reflog` if something goes wrong\n- Force push carefully: `git push --force-with-lease`\n\nFor detailed examples and advanced techniques, see `examples\u002Finteractive_rebase.md`.\n\n### 2. Conflict Resolution Workflow\n\n**Understanding Conflict Markers:**\n```\n\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD (Current Change)\nYour code from current branch\n=======\nTheir code from merging branch\n>>>>>>> branch-name (Incoming Change)\n```\n\n**Resolution Process:**\n\n```bash\n# 1. Identify conflicts\ngit status\n\n# 2. Choose resolution strategy:\n\n# Strategy A: Manual resolution\nvim \u003Cfile>  # Edit between markers\ngit add \u003Cfile>\n\n# Strategy B: Accept one side\ngit checkout --ours \u003Cfile>    # Keep yours\ngit checkout --theirs \u003Cfile>  # Keep theirs\ngit add \u003Cfile>\n\n# Strategy C: Use merge tool\ngit mergetool\n\n# 3. Continue operation\ngit merge --continue\n# or\ngit rebase --continue\n```\n\n**Three-Way Diff:**\n```bash\n# Show what YOU changed\ngit diff --ours \u003Cfile>\n\n# Show what THEY changed\ngit diff --theirs \u003Cfile>\n\n# Show common ancestor\ngit diff --base \u003Cfile>\n```\n\nFor common conflict patterns and solutions, see `examples\u002Fconflict_resolution.md`.\n\n### 3. Git Bisect for Bug Hunting\n\n**Scenario:** Bug exists in current version, find which commit introduced it.\n\n**Manual Bisect:**\n```bash\n# 1. Start bisect\ngit bisect start\n\n# 2. Mark current state as bad\ngit bisect bad\n\n# 3. Mark known good commit\ngit bisect good v1.0.0\n\n# 4. Test the code (Git checks out middle commit)\n# Run app, check if bug exists\n\n# 5. Mark result\ngit bisect bad   # If bug exists\ngit bisect good  # If bug doesn't exist\n\n# Repeat until Git finds first bad commit\n\n# 6. End bisect\ngit bisect reset\n```\n\n**Automated Bisect:**\n```bash\n# Create test script (test.sh)\n#!\u002Fbin\u002Fbash\nnpm test\nexit $?\n\n# Run automated bisect\ngit bisect start\ngit bisect bad\ngit bisect good v1.0.0\ngit bisect run .\u002Ftest.sh\n\n# Git automatically finds bad commit\ngit bisect reset\n```\n\n### 4. Branch Management\n\n**Quick Cleanup:**\n```bash\n# Use helper script\nbash scripts\u002Fgit_helper.sh cleanup-branches\n\n# Or manual cleanup\ngit branch --merged main | grep -v \"\\*\\|main\\|develop\" | xargs git branch -d\ngit fetch --prune\n```\n\n**Stale Branch Detection:**\n```bash\n# Show branches with last commit date\nfor branch in $(git branch -r | grep -v HEAD); do\n    echo -e \"$(git show --format=\"%ci %cr\" $branch | head -n 1)\\t$branch\"\ndone | sort -r\n```\n\nFor detailed branch management strategies, see `references\u002Fbranch-management.md`.\n\n### 5. Reflog Recovery\n\n**Recover Deleted Branch:**\n```bash\n# View reflog\ngit reflog\n\n# Find commit where branch was deleted\n# Restore branch\ngit checkout -b feature-x \u003Ccommit-hash>\n```\n\n**Undo Bad Reset:**\n```bash\n# Accidentally ran: git reset --hard HEAD~5\n\n# View reflog\ngit reflog\n\n# Restore previous state\ngit reset --hard HEAD@{1}\n```\n\n**Recover Lost Commits:**\n```bash\n# Find dangling commits\ngit fsck --lost-found\n\n# Cherry-pick recovered commit\ngit cherry-pick \u003Clost-commit-hash>\n```\n\nFor comprehensive recovery techniques, see `references\u002Freflog-recovery.md`.\n\n## Branch Strategy Implementation\n\nThis skill supports implementing various branching strategies. Choose based on your team's needs:\n\n### Git Flow\n**Best for:** Projects with scheduled releases, multiple production versions\n\n**Branch Types:**\n- `main`: Production-ready code\n- `develop`: Integration branch\n- `feature\u002F*`: New features\n- `release\u002F*`: Release preparation\n- `hotfix\u002F*`: Production fixes\n\n**Quick Start:**\n```bash\n# Feature development\ngit checkout develop\ngit checkout -b feature\u002Fuser-auth\n# Work on feature\ngit checkout develop\ngit merge --no-ff feature\u002Fuser-auth\n```\n\n### Trunk-Based Development\n**Best for:** Continuous deployment, fast-moving teams\n\n**Principles:**\n- Single main branch\n- Short-lived feature branches (\u003C 1 day)\n- Frequent integration\n- Feature flags for incomplete work\n\n**Quick Start:**\n```bash\n# Create short-lived branch\ngit checkout main\ngit checkout -b feature\u002Fquick-fix\n# Work and merge same day\ngit checkout main\ngit merge feature\u002Fquick-fix\n```\n\nFor complete branch strategy workflows, see `examples\u002Fbranch_strategies.md`.\n\n## Best Practices\n\n### Before Rebase\n- Create backup branch: `git branch backup`\n- Ensure working directory is clean: `git status`\n- Know your commit history: `git log --oneline`\n- Never rebase public\u002Fshared branches\n\n### During Conflicts\n- Understand both sides of the conflict\n- Test thoroughly after resolution\n- Use meaningful merge commit messages\n- Document complex resolutions\n\n### Branch Management\n- Delete merged branches promptly\n- Use descriptive branch names: `feature\u002Fuser-login`\n- Keep branches focused and short-lived\n- Sync with main branch regularly\n\n### History Hygiene\n- Squash \"fixup\" commits before pushing\n- Write clear, descriptive commit messages\n- Keep commits atomic (one logical change)\n- Use conventional commit format when possible\n\nFor comprehensive best practices, see `references\u002Fbest-practices.md`.\n\n## Troubleshooting\n\n### Rebase Conflicts\n```bash\n# If conflicts are too complex\ngit rebase --abort\n\n# Start over with different approach\ngit merge --no-ff \u003Cbranch>\n```\n\n### Lost Commits\n```bash\n# Always check reflog first\ngit reflog\n\n# Find and recover\ngit checkout -b recovery \u003Ccommit-hash>\n```\n\n### Detached HEAD State\n```bash\n# Create branch from detached HEAD\ngit checkout -b new-branch-name\n\n# Or go back to branch\ngit checkout main\n```\n\n### Failed Push After Rebase\n```bash\n# Only if you're certain and branch is not shared\ngit push --force-with-lease\n\n# Safer: Create new branch\ngit checkout -b feature-v2\ngit push origin feature-v2\n```\n\nFor detailed troubleshooting, see `references\u002Ftroubleshooting.md`.\n\n## Additional Resources\n\n### Detailed Guides\n- `examples\u002Finteractive_rebase.md`: Step-by-step rebase examples with scenarios\n- `examples\u002Fconflict_resolution.md`: Common conflict patterns and solutions\n- `examples\u002Fbranch_strategies.md`: Complete Git Flow and trunk-based workflows\n\n### Reference Documentation\n- `references\u002Fbranch-management.md`: Branch cleanup automation and strategies\n- `references\u002Freflog-recovery.md`: Recovery techniques and history rewriting\n- `references\u002Fbest-practices.md`: Comprehensive best practices and quality standards\n- `references\u002Ftroubleshooting.md`: Common issues and emergency recovery\n\n### Helper Scripts\n- `scripts\u002Fgit_helper.sh`: Branch cleanup and conflict resolution utilities\n\n## Quick Reference Commands\n\n### Must-Know Commands\n```bash\n# Interactive rebase\ngit rebase -i HEAD~N\n\n# Abort operations\ngit rebase --abort\ngit merge --abort\ngit cherry-pick --abort\n\n# View history\ngit log --oneline --graph --all\ngit reflog\n\n# Conflict resolution\ngit checkout --ours \u003Cfile>\ngit checkout --theirs \u003Cfile>\n\n# Recovery\ngit fsck --lost-found\ngit reflog\n\n# Cleanup\ngit branch --merged | xargs git branch -d\ngit fetch --prune\n```\n\n### Safety First\n1. Always backup before history rewrite: `git branch backup`\n2. Never force push to shared branches: Use `--force-with-lease`\n3. Test after conflicts: Don't assume resolution is correct\n4. Document complex operations: Leave comments in merge commits\n5. Use reflog: It's your safety net for 30+ days\n\n---\n\nMaster these advanced Git operations to maintain clean history, resolve conflicts efficiently, and manage complex development workflows with confidence.\n","# Advanced Git Operations\n\n## Overview\n\nMaster advanced Git workflows for complex version control scenarios. This skill covers sophisticated operations beyond basic commits and merges, including interactive rebasing, advanced conflict resolution, history manipulation, and strategic branch management.\n\nUse this skill when you need to:\n- Clean up messy commit history before code review\n- Resolve complex merge conflicts strategically\n- Hunt down bugs with binary search (bisect)\n- Recover lost commits or undo mistakes\n- Implement team branching strategies\n- Rewrite history safely\n\n## Core Capabilities\n\n### Interactive Rebasing\n- Reorder commits for logical history\n- Squash multiple commits into one\n- Edit commit messages retroactively\n- Split commits into smaller pieces\n- Remove unwanted commits from history\n\n### Conflict Resolution\n- Strategic merge conflict handling\n- Three-way merge understanding\n- Ours vs theirs strategy selection\n- Conflict marker interpretation\n- Partial file staging during conflicts\n\n### Git Bisect\n- Binary search for bug introduction\n- Automated bisect with scripts\n- Good\u002Fbad commit identification\n- Efficient debugging of regressions\n\n### History Manipulation\n- Amend commits safely\n- Filter-branch operations\n- BFG Repo-Cleaner for large files\n- Rewrite history with caution\n- Preserve attribution and dates\n\n### Branch Strategies\n- Git Flow workflow\n- Trunk-based development\n- Feature branch workflows\n- Release branch management\n- Hotfix procedures\n\n## Quick Command Reference\n\n### Interactive Rebase\n```bash\n# Rebase last 5 commits interactively\ngit rebase -i HEAD~5\n\n# Rebase onto main branch\ngit rebase -i main\n\n# Continue after resolving conflicts\ngit rebase --continue\n\n# Abort and return to original state\ngit rebase --abort\n```\n\n### Conflict Resolution\n```bash\n# Accept ours (current branch)\ngit checkout --ours \u003Cfile>\n\n# Accept theirs (incoming branch)\ngit checkout --theirs \u003Cfile>\n\n# List conflicted files\ngit diff --name-only --diff-filter=U\n\n# Mark as resolved\ngit add \u003Cfile>\n```\n\n### Git Bisect\n```bash\n# Start bisect session\ngit bisect start\ngit bisect bad\ngit bisect good \u003Ccommit-hash>\n\n# Automate with test script\ngit bisect run .\u002Ftest-script.sh\n\n# End bisect session\ngit bisect reset\n```\n\n### Cherry-Pick\n```bash\n# Apply specific commit\ngit cherry-pick \u003Ccommit-hash>\n\n# Cherry-pick without committing\ngit cherry-pick -n \u003Ccommit-hash>\n\n# Cherry-pick range of commits\ngit cherry-pick A^..B\n```\n\n### Reflog Recovery\n```bash\n# View reflog history\ngit reflog\n\n# Recover lost commit\ngit checkout -b recovery \u003Ccommit-hash>\n\n# Reset to previous state\ngit reset --hard HEAD@{2}\n```\n\n## Core Workflows\n\n### 1. Interactive Rebase Workflow\n\n**When to Use:**\n- Clean up messy commit history before pushing\n- Combine \"WIP\" or \"fix typo\" commits\n- Reorder commits for logical progression\n- Split large commits into focused changes\n\n**Steps:**\n\n```bash\n# 1. Start interactive rebase for last N commits\ngit rebase -i HEAD~5\n\n# Interactive editor opens with commit list\n# Modify commands to reorganize history\n```\n\n**Rebase Commands:**\n- `pick` (p): Keep commit as-is\n- `reword` (r): Keep commit, edit message\n- `edit` (e): Keep commit, stop to amend\n- `squash` (s): Combine with previous commit, keep message\n- `fixup` (f): Combine with previous commit, discard message\n- `drop` (d): Remove commit entirely\n\n**Example:**\n```bash\n# Before\npick abc1234 Add feature X\npick def5678 Fix typo\npick ghi9012 WIP commit\npick jkl3456 Update documentation\n\n# After cleanup\npick abc1234 Add feature X\nfixup def5678 Fix typo\ndrop ghi9012 WIP commit\nreword jkl3456 Update documentation\n```\n\n**Safety Tips:**\n- Never rebase commits already pushed to shared branches\n- Create backup branch: `git branch backup`\n- Use `git reflog` if something goes wrong\n- Force push carefully: `git push --force-with-lease`\n\nFor detailed examples and advanced techniques, see `examples\u002Finteractive_rebase.md`.\n\n### 2. Conflict Resolution Workflow\n\n**Understanding Conflict Markers:**\n```\n\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD (Current Change)\nYour code from current branch\n=======\nTheir code from merging branch\n>>>>>>> branch-name (Incoming Change)\n```\n\n**Resolution Process:**\n\n```bash\n# 1. Identify conflicts\ngit status\n\n# 2. Choose resolution strategy:\n\n# Strategy A: Manual resolution\nvim \u003Cfile>  # Edit between markers\ngit add \u003Cfile>\n\n# Strategy B: Accept one side\ngit checkout --ours \u003Cfile>    # Keep yours\ngit checkout --theirs \u003Cfile>  # Keep theirs\ngit add \u003Cfile>\n\n# Strategy C: Use merge tool\ngit mergetool\n\n# 3. Continue operation\ngit merge --continue\n# or\ngit rebase --continue\n```\n\n**Three-Way Diff:**\n```bash\n# Show what YOU changed\ngit diff --ours \u003Cfile>\n\n# Show what THEY changed\ngit diff --theirs \u003Cfile>\n\n# Show common ancestor\ngit diff --base \u003Cfile>\n```\n\nFor common conflict patterns and solutions, see `examples\u002Fconflict_resolution.md`.\n\n### 3. Git Bisect for Bug Hunting\n\n**Scenario:** Bug exists in current version, find which commit introduced it.\n\n**Manual Bisect:**\n```bash\n# 1. Start bisect\ngit bisect start\n\n# 2. Mark current state as bad\ngit bisect bad\n\n# 3. Mark known good commit\ngit bisect good v1.0.0\n\n# 4. Test the code (Git checks out middle commit)\n# Run app, check if bug exists\n\n# 5. Mark result\ngit bisect bad   # If bug exists\ngit bisect good  # If bug doesn't exist\n\n# Repeat until Git finds first bad commit\n\n# 6. End bisect\ngit bisect reset\n```\n\n**Automated Bisect:**\n```bash\n# Create test script (test.sh)\n#!\u002Fbin\u002Fbash\nnpm test\nexit $?\n\n# Run automated bisect\ngit bisect start\ngit bisect bad\ngit bisect good v1.0.0\ngit bisect run .\u002Ftest.sh\n\n# Git automatically finds bad commit\ngit bisect reset\n```\n\n### 4. Branch Management\n\n**Quick Cleanup:**\n```bash\n# Use helper script\nbash scripts\u002Fgit_helper.sh cleanup-branches\n\n# Or manual cleanup\ngit branch --merged main | grep -v \"\\*\\|main\\|develop\" | xargs git branch -d\ngit fetch --prune\n```\n\n**Stale Branch Detection:**\n```bash\n# Show branches with last commit date\nfor branch in $(git branch -r | grep -v HEAD); do\n    echo -e \"$(git show --format=\"%ci %cr\" $branch | head -n 1)\\t$branch\"\ndone | sort -r\n```\n\nFor detailed branch management strategies, see `references\u002Fbranch-management.md`.\n\n### 5. Reflog Recovery\n\n**Recover Deleted Branch:**\n```bash\n# View reflog\ngit reflog\n\n# Find commit where branch was deleted\n# Restore branch\ngit checkout -b feature-x \u003Ccommit-hash>\n```\n\n**Undo Bad Reset:**\n```bash\n# Accidentally ran: git reset --hard HEAD~5\n\n# View reflog\ngit reflog\n\n# Restore previous state\ngit reset --hard HEAD@{1}\n```\n\n**Recover Lost Commits:**\n```bash\n# Find dangling commits\ngit fsck --lost-found\n\n# Cherry-pick recovered commit\ngit cherry-pick \u003Clost-commit-hash>\n```\n\nFor comprehensive recovery techniques, see `references\u002Freflog-recovery.md`.\n\n## Branch Strategy Implementation\n\nThis skill supports implementing various branching strategies. Choose based on your team's needs:\n\n### Git Flow\n**Best for:** Projects with scheduled releases, multiple production versions\n\n**Branch Types:**\n- `main`: Production-ready code\n- `develop`: Integration branch\n- `feature\u002F*`: New features\n- `release\u002F*`: Release preparation\n- `hotfix\u002F*`: Production fixes\n\n**Quick Start:**\n```bash\n# Feature development\ngit checkout develop\ngit checkout -b feature\u002Fuser-auth\n# Work on feature\ngit checkout develop\ngit merge --no-ff feature\u002Fuser-auth\n```\n\n### Trunk-Based Development\n**Best for:** Continuous deployment, fast-moving teams\n\n**Principles:**\n- Single main branch\n- Short-lived feature branches (\u003C 1 day)\n- Frequent integration\n- Feature flags for incomplete work\n\n**Quick Start:**\n```bash\n# Create short-lived branch\ngit checkout main\ngit checkout -b feature\u002Fquick-fix\n# Work and merge same day\ngit checkout main\ngit merge feature\u002Fquick-fix\n```\n\nFor complete branch strategy workflows, see `examples\u002Fbranch_strategies.md`.\n\n## Best Practices\n\n### Before Rebase\n- Create backup branch: `git branch backup`\n- Ensure working directory is clean: `git status`\n- Know your commit history: `git log --oneline`\n- Never rebase public\u002Fshared branches\n\n### During Conflicts\n- Understand both sides of the conflict\n- Test thoroughly after resolution\n- Use meaningful merge commit messages\n- Document complex resolutions\n\n### Branch Management\n- Delete merged branches promptly\n- Use descriptive branch names: `feature\u002Fuser-login`\n- Keep branches focused and short-lived\n- Sync with main branch regularly\n\n### History Hygiene\n- Squash \"fixup\" commits before pushing\n- Write clear, descriptive commit messages\n- Keep commits atomic (one logical change)\n- Use conventional commit format when possible\n\nFor comprehensive best practices, see `references\u002Fbest-practices.md`.\n\n## Troubleshooting\n\n### Rebase Conflicts\n```bash\n# If conflicts are too complex\ngit rebase --abort\n\n# Start over with different approach\ngit merge --no-ff \u003Cbranch>\n```\n\n### Lost Commits\n```bash\n# Always check reflog first\ngit reflog\n\n# Find and recover\ngit checkout -b recovery \u003Ccommit-hash>\n```\n\n### Detached HEAD State\n```bash\n# Create branch from detached HEAD\ngit checkout -b new-branch-name\n\n# Or go back to branch\ngit checkout main\n```\n\n### Failed Push After Rebase\n```bash\n# Only if you're certain and branch is not shared\ngit push --force-with-lease\n\n# Safer: Create new branch\ngit checkout -b feature-v2\ngit push origin feature-v2\n```\n\nFor detailed troubleshooting, see `references\u002Ftroubleshooting.md`.\n\n## Additional Resources\n\n### Detailed Guides\n- `examples\u002Finteractive_rebase.md`: Step-by-step rebase examples with scenarios\n- `examples\u002Fconflict_resolution.md`: Common conflict patterns and solutions\n- `examples\u002Fbranch_strategies.md`: Complete Git Flow and trunk-based workflows\n\n### Reference Documentation\n- `references\u002Fbranch-management.md`: Branch cleanup automation and strategies\n- `references\u002Freflog-recovery.md`: Recovery techniques and history rewriting\n- `references\u002Fbest-practices.md`: Comprehensive best practices and quality standards\n- `references\u002Ftroubleshooting.md`: Common issues and emergency recovery\n\n### Helper Scripts\n- `scripts\u002Fgit_helper.sh`: Branch cleanup and conflict resolution utilities\n\n## Quick Reference Commands\n\n### Must-Know Commands\n```bash\n# Interactive rebase\ngit rebase -i HEAD~N\n\n# Abort operations\ngit rebase --abort\ngit merge --abort\ngit cherry-pick --abort\n\n# View history\ngit log --oneline --graph --all\ngit reflog\n\n# Conflict resolution\ngit checkout --ours \u003Cfile>\ngit checkout --theirs \u003Cfile>\n\n# Recovery\ngit fsck --lost-found\ngit reflog\n\n# Cleanup\ngit branch --merged | xargs git branch -d\ngit fetch --prune\n```\n\n### Safety First\n1. Always backup before history rewrite: `git branch backup`\n2. Never force push to shared branches: Use `--force-with-lease`\n3. Test after conflicts: Don't assume resolution is correct\n4. Document complex operations: Leave comments in merge commits\n5. Use reflog: It's your safety net for 30+ days\n\n---\n\nMaster these advanced Git operations to maintain clean history, resolve conflicts efficiently, and manage complex development workflows with confidence.\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill git-advanced",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill git-advanced",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill git-advanced","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002FSKILL.md",true,[67,73,79,83,87,91,95,99,103,107,113],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"customize.toml","OTHER","其他",235,"https:\u002F\u002Fgithub.com\u002Fcarl0sfelipe\u002FBTC-Daytrade-Tycoon\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-create-prd\u002Fcustomize.toml",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"examples\u002Fbranch_strategies.md","REFERENCE","参考文档",14771,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Fexamples\u002Fbranch_strategies.md",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"examples\u002Fconflict_resolution.md",12186,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Fexamples\u002Fconflict_resolution.md",{"path":84,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":85,"sourceHtmlUrl":86},"examples\u002Finteractive_rebase.md",8151,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Fexamples\u002Finteractive_rebase.md",{"path":88,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":89,"sourceHtmlUrl":90},"README.md",2162,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002FREADME.md",{"path":92,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fbest-practices.md",9369,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Freferences\u002Fbest-practices.md",{"path":96,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fbranch-management.md",4253,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Freferences\u002Fbranch-management.md",{"path":100,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Freflog-recovery.md",7166,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Freferences\u002Freflog-recovery.md",{"path":104,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Ftroubleshooting.md",11325,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Freferences\u002Ftroubleshooting.md",{"path":108,"resourceType":109,"resourceTypeDesc":110,"sizeBytes":111,"sourceHtmlUrl":112},"scripts\u002Fgit_helper.sh","SCRIPT","脚本",12175,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Fscripts\u002Fgit_helper.sh",{"path":114,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":115,"sourceHtmlUrl":116},"skill-report.json",12072,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fautumnsgrove\u002Fgit-advanced\u002Fskill-report.json",[118,127,136,145,151,157],{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[124,125,126],"model","model hierarchy","model hierarchy skill",{"skillNo":128,"name":129,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[133,134,135],"MCP","zoom","zoom mcp",{"skillNo":137,"name":138,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[142,143,144,134],"sdk","zoom apps sdk","apps",{"skillNo":146,"name":147,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[147],{"skillNo":152,"name":153,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[153],{"skillNo":158,"name":159,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[159]]