Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Advanced git operations including rebase, bisect, cherry-pick, and conflict resolution. Use when rebasing feature branches, debugging with bisect, cherry-picking commits between branches, resolving complex merge conflicts, or recovering from git mistakes. Do NOT use for routine commits or simple pushes.
.claude/skills/bybren-llc-git-advanced/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 58% | 0% |
Provide guidance for advanced git operations with safety considerations. This project uses a rebase-first workflow with linear history—understand these patterns to avoid breaking the codebase.
bash# FORBIDDEN: Force push to protected branches git push --force origin main # NEVER git push --force origin master # NEVER # FORBIDDEN: Merge commits on main branch git merge feature-branch # Use rebase-and-merge PR strategy # FORBIDDEN: Skip pre-commit hooks git commit --no-verify # Hooks exist for a reason # FORBIDDEN: Rewriting shared history git rebase -i HEAD~5 && git push --force # If already pushed
bash# SAFE: Force-with-lease on your feature branch git push --force-with-lease origin {{TICKET_PREFIX}}-XXX-feature # Safe # SAFE: Interactive rebase before first push git rebase -i origin/main # Squash/clean local commits # SAFE: Force push after conflict resolution git rebase origin/main && git push --force-with-lease origin {{TICKET_PREFIX}}-XXX-feature
bash# 1. Fetch latest changes git fetch origin main # 2. Rebase onto latest main git rebase origin/main # 3. If conflicts, resolve them git status # See conflicted files # ... edit files to resolve ... git add <resolved-files> git rebase --continue # 4. Push with force-with-lease git push --force-with-lease origin {{TICKET_PREFIX}}-XXX-feature
bash# 1. Make requested changes git add . && git commit -m "fix: address PR feedback [{{TICKET_PREFIX}}-XXX]" # 2. Fetch and rebase again git fetch origin main git rebase origin/main # 3. Push update git push --force-with-lease origin {{TICKET_PREFIX}}-XXX-feature
Use bisect when you know a bug was introduced at some point but don't know which commit.
bash# 1. Start bisect git bisect start # 2. Mark current state (has bug) git bisect bad # 3. Mark a known good commit git bisect good <commit-sha> # e.g., git bisect good abc1234 # 4. Git checks out middle commit - test it yarn test:unit # or manual test # 5. Tell git if this commit is good or bad git bisect good # or git bisect bad # 6. Repeat until found # Git will tell you the first bad commit # 7. End bisect git bisect reset
bash# Run a test script automatically git bisect start HEAD abc1234 git bisect run yarn test:specific-test
bash# 1. Find the commit SHA git log --oneline branch-name | head -20 # 2. Cherry-pick to current branch git cherry-pick <commit-sha> # 3. If conflicts, resolve them git status # ... resolve conflicts ... git add <resolved-files> git cherry-pick --continue # 4. Push the result git push origin current-branch
bash# Range of commits (oldest..newest, exclusive of oldest) git cherry-pick abc123^..def456 # Specific commits git cherry-pick abc123 def456 ghi789
| Scenario | Resolution Strategy | | ------------------------ | ------------------------------- | | Same line edited | Choose one version or combine | | File deleted vs modified | Decide: keep modified or delete | | Rename conflicts | Decide which name to use | | Binary file conflicts | Choose one version explicitly |
bash# 1. See what's conflicted git status # 2. Open conflicted file, look for markers <<<<<<< HEAD your changes ======= their changes >>>>>>> branch-name # 3. Edit file to resolve (remove markers, keep correct code) # 4. Mark as resolved git add <resolved-file> # 5. Continue rebase/merge git rebase --continue # or git merge --continue
bash# Rebase frequently to avoid large conflicts git fetch origin main git rebase origin/main # Do this daily during long features # Check for potential conflicts before rebase git diff origin/main...HEAD --stat
bash# Abort rebase git rebase --abort # Abort merge git merge --abort # Abort cherry-pick git cherry-pick --abort
bash# Keep changes staged git reset --soft HEAD~1 # Keep changes unstaged git reset HEAD~1 # Discard changes (DANGEROUS) git reset --hard HEAD~1
bash# Find lost commits in reflog git reflog # Restore to a specific state git reset --hard HEAD@{n} # Cherry-pick a lost commit git cherry-pick <sha-from-reflog>
ALWAYS ask first if:
bash# 1. Verify you're on correct branch git branch # 2. Verify what will be pushed git log origin/{{TICKET_PREFIX}}-XXX-feature..HEAD --oneline # 3. Use force-with-lease (protects against overwriting others' work) git push --force-with-lease origin {{TICKET_PREFIX}}-XXX-feature
yarn ci:validate passes| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | 9,832 | 3,603 | -63% | 1 | 1 | 0% | 1,529 | 2,117 | +38% | 0 | 0 | — |
case-03 | fail→pass | 12,579 | 4,085 | -68% | 1 | 1 | 0% | 2,079 | 2,379 | +14% | 0 | 0 | — |
case-04 | fail→pass | 10,637 | 6,894 | -35% | 1 | 1 | 0% | 1,596 | 2,705 | +69% | 0 | 0 | — |
case-05 | pass→pass | 11,686 | 6,663 | -43% | 1 | 1 | 0% | 1,817 | 2,768 | +52% | 0 | 0 | — |
case-01 | pass→pass | 12,805 | 7,556 | -41% | 1 | 1 | 0% | 2,102 | 3,138 | +49% | 0 | 0 | — |
case-06 | fail→pass | 8,348 | 4,751 | -43% | 1 | 1 | 0% | 1,471 | 2,440 | +66% | 0 | 0 | — |
case-07 | pass→pass | 11,660 | 5,768 | -51% | 1 | 1 | 0% | 2,008 | 2,579 | +28% | 0 | 0 | — |
case-08 | pass→pass | 9,218 | 4,199 | -54% | 1 | 1 | 0% | 1,543 | 2,306 | +49% | 0 | 0 | — |
case-09 | pass→pass | 6,168 | 4,694 | -24% | 1 | 1 | 0% | 1,021 | 2,411 | +136% | 0 | 0 | — |
case-10 | fail→fail | 6,749 | 4,087 | -39% | 1 | 1 | 0% | 1,172 | 2,346 | +100% | 0 | 0 | — |
case-11 | pass→pass | 4,345 | 3,851 | -11% | 1 | 1 | 0% | 740 | 2,263 | +206% | 0 | 0 | — |
case-12 | pass→pass | 6,805 | 3,772 | -45% | 1 | 1 | 0% | 1,070 | 2,050 | +92% | 0 | 0 | — |
case-13 | pass→pass | 5,672 | 3,359 | -41% | 1 | 1 | 0% | 932 | 2,143 | +130% | 0 | 0 | — |
case-14 | pass→pass | 7,084 | 5,536 | -22% | 1 | 1 | 0% | 1,072 | 2,489 | +132% | 0 | 0 | — |
case-15 | pass→pass | 9,983 | 4,865 | -51% | 1 | 1 | 0% | 1,541 | 2,420 | +57% | 0 | 0 | — |
case-16 | fail→pass | 10,771 | 6,242 | -42% | 1 | 1 | 0% | 1,709 | 2,692 | +58% | 0 | 0 | — |
case-17 | fail→pass | 13,177 | 7,411 | -44% | 1 | 1 | 0% | 2,123 | 2,852 | +34% | 0 | 0 | — |
case-18 | pass→pass | 4,728 | 3,317 | -30% | 1 | 1 | 0% | 803 | 2,157 | +169% | 0 | 0 | — |
case-19 | pass→pass | 14,759 | 2,470 | -83% | 1 | 1 | 0% | 2,090 | 1,990 | -5% | 0 | 0 | — |
case-20 | pass→pass | 7,406 | 3,595 | -51% | 1 | 1 | 0% | 1,208 | 2,152 | +78% | 0 | 0 | — |
case-21 | pass→pass | 4,412 | 3,344 | -24% | 1 | 1 | 0% | 758 | 2,174 | +187% | 0 | 0 | — |
case-22 | pass→pass | 5,241 | 3,436 | -34% | 1 | 1 | 0% | 916 | 2,204 | +141% | 0 | 0 | — |
case-23 | fail→pass | 11,602 | 1,865 | -84% | 1 | 1 | 0% | 1,748 | 1,877 | +7% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +30 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.