rebase-latest-main
Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.
npx skills add dyoshikawa/rulesync --skill rebase-latest-main --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Rebase Latest Main Fetch the latest `origin/main` and rebase it onto the current working branch. ## Step 1: Verify Current State 1. Check the current branch: ```bash git branch --show-current ``` 2. Ensure there are no uncommitted changes: ```bash git status --porcelain ``` If there are uncommitted changes, either: - Commit them first, or - Ask the user how to proceed (commit, stash, or abort) ## Step 2: Fetch Latest Changes Fetch the latest changes from the remote: ```bash git fetch origin main ``` ## Step 3: Rebase onto origin/main Start the rebase: ```bash git rebase origin/main ``` ### If rebase succeeds without conflicts: Proceed to Step 5. ### If conflicts occur: 1. Identify conflicting files: ```bash git diff --name-only --diff-filter=U ``` 2. For each conflicting file: - Read the file content to understand the conflict - Analyze both versions (HEAD and origin/main) - Resolve the conflict by choosing the appropriate changes or merging them - Stage the resolved file: ```bash git add <resolved-file> ``` 3. Continue the rebase: ```bash git rebase --continue ``` 4. Repeat until all conflicts are resolved and rebase is complete. ## Step 4: Handle Rebase Failure If unable to res
- Step 1: Verify Current State
- Step 2: Fetch Latest Changes
- Step 3: Rebase onto origin/main
- If rebase succeeds without conflicts:
- If conflicts occur:
- Step 4: Handle Rebase Failure
- Step 5: Push Changes
- Step 6: Report Result
git branch --show-current git status --porcelain git fetch origin main git rebase origin/main git diff --name-only --diff-filter=U git add <resolved-file> git rebase --continue git rebase --abort git push --force-with-lease
What does the rebase-latest-main skill do?
Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.
How do I install it?
Run `npx skills add dyoshikawa/rulesync --skill rebase-latest-main --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dyoshikawa/rulesync, a repository with 1,285 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.