brainstorming
Structured design dialogue that validates ideas before implementation begins.
This skill teaches how to manage stacked PRs (pr1 → pr2 → pr3) after the base PR merges. Covers rebasing dependent PRs onto the updated base branch using cherry-pick workflow. Use this when you have a chain of dependent PRs and need to update them after merging earlier PRs in the stack.
Full skill instructions
When working with PR trains (pr1, pr2 based on pr1, etc.), you need to update the dependent PRs after merging the base PR. This skill shows how to rebase dependent PRs onto the updated base branch.
main and master base branchesWhen you have:
pr1 → pr2 → pr3
After merging pr1 to origin/main, you need to:
pr2origin/mainpr2pr3 based on the updated pr2pr1 is merged to origin/masterpr2 and pr3 are still openpr2 was based on pr1pr3 was based on pr2# Checkout the pr2 branch
git checkout origin/pr2
# Look at git log to identify commits unique to pr2
git log --oneline
# Identify which commits are from pr2 (not from pr1)
# Note the commit hashes
# Checkout the updated base branch
git checkout origin/master
# Cherry-pick the pr2 commits onto master
git cherry-pick <commit-hash1> <commit-hash2> ...
# Push the updated pr2 branch
git push origin HEAD:pr2 --force-with-lease
# Checkout the pr3 branch
git checkout origin/pr3
# Look at git log to identify commits unique to pr3
git log --oneline
# Identify which commits are from pr3 (not from pr2)
# Note the commit hashes
# Checkout the updated pr2 branch
git checkout origin/pr2
# Cherry-pick the pr3 commits onto pr2
git cherry-pick <commit-hash1> <commit-hash2> ...
# Push the updated pr3 branch
git push origin HEAD:pr3 --force-with-lease
When you run git log --oneline on a dependent branch, you'll see:
abc1234 My pr2 commit 2
def5678 My pr2 commit 1
9ab0cde Commit from pr1 (already merged)
1234567 Another commit from pr1 (already merged)
You want to cherry-pick only the pr2 commits (abc1234 and def5678).
Tip: Look at the PR description or commit messages to identify which commits belong to which PR.
--force-with-lease is safer than --force because:
Why we need force-push: After cherry-picking, the branch history has changed (different base), so we must force-push.
# User: "pr1 just merged, please update pr2"
# Current state: pr1 merged to origin/main, pr2 is open
# Checkout pr2
git checkout origin/pr2
# See what commits are unique to pr2
git log --oneline --decorate
# Example output:
# 7a8b9c0 (origin/pr2) Add feature B tests
# 6d7e8f9 Add feature B implementation
# 5c6d7e8 (origin/main) Add feature A (merged)
# The first two commits are pr2-specific
# Checkout updated main
git checkout origin/main
# Cherry-pick pr2 commits
git cherry-pick 6d7e8f9 7a8b9c0
# Update remote pr2
git push origin HEAD:pr2 --force-with-lease
# User: "pr1 merged, update pr2 and pr3"
# Update pr2 first
git checkout origin/pr2
git log --oneline # Identify pr2 commits: aaa1111, bbb2222
git checkout origin/main
git cherry-pick aaa1111 bbb2222
git push origin HEAD:pr2 --force-with-lease
# Now update pr3 based on the NEW pr2
git checkout origin/pr3
git log --oneline # Identify pr3 commits: ccc3333, ddd4444
git checkout origin/pr2 # Use the UPDATED pr2 as base
git cherry-pick ccc3333 ddd4444
git push origin HEAD:pr3 --force-with-lease
# Some repos use 'main', others use 'master'
# Check which one exists
git branch -r | grep -E "origin/(main|master)"
# If main:
git checkout origin/main
git cherry-pick <commits>
git push origin HEAD:pr2 --force-with-lease
# If master:
git checkout origin/master
git cherry-pick <commits>
git push origin HEAD:pr2 --force-with-lease
# After updating pr2, verify it's based on the latest main
git checkout origin/pr2
git log --oneline
# Should see pr2 commits on top of recent main commits
# Should NOT see pr1 commits separately
After pushing:
After force-pushing:
Cause: The commits from pr2 conflict with changes merged in pr1
Solution:
# During cherry-pick, you'll see conflicts
git status # Shows conflicting files
# Resolve conflicts manually
vim <conflicting-file>
# Stage resolved files
git add <conflicting-file>
# Continue the cherry-pick
git cherry-pick --continue
# If multiple commits, repeat for each conflict
# Once done, force-push
git push origin HEAD:pr2 --force-with-lease
Cause: Unclear commit messages or mixed work
Solution:
# Option 1: Check the PR diff in GitHub
# Go to the PR and see which commits were included
# Option 2: Use git log with range
git log origin/pr1..origin/pr2
# This shows commits in pr2 that aren't in pr1
# Option 3: Check commit dates/authors
git log --oneline --author="Your Name" --since="2 days ago"
Cause: Someone else pushed to the branch after you checked it out
Solution:
# Fetch latest
git fetch origin pr2
# Check what changed
git log origin/pr2
# If it's just CI updates or minor changes:
# Use --force (carefully!)
git push origin HEAD:pr2 --force
# If it's significant work from someone else:
# Coordinate with them before force-pushing
Cause: GitHub UI hasn't updated after force-push
Solution:
Cause: Integration issue between merged pr1 and pr2
Solution:
Update PRs immediately after merge
Work on one PR at a time when possible
Use descriptive commit messages
Verify CI passes at each step
Keep the stack shallow
Communicate with reviewers
# Some prefer rebase over cherry-pick
git checkout origin/pr2
git rebase origin/main
git push origin HEAD:pr2 --force-with-lease
When to use rebase vs cherry-pick:
GitHub offers an "Update branch" button on PRs:
Stick with the manual cherry-pick workflow for cleaner history.
# Update pr2 after pr1 merges
git checkout origin/pr2
git log --oneline # Identify pr2 commits
git checkout origin/main
git cherry-pick <hash1> <hash2> # Apply pr2 commits
git push origin HEAD:pr2 --force-with-lease
# Update pr3 after pr2 is updated
git checkout origin/pr3
git log --oneline # Identify pr3 commits
git checkout origin/pr2 # Use updated pr2 as base
git cherry-pick <hash1> <hash2> # Apply pr3 commits
git push origin HEAD:pr3 --force-with-lease
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs