Git Rebase Main
SkillProductivityLand a finished branch on local main with linear history, commit pending work, commit main's own dirt first, rebase onto main, fast-forward main. Use when the user asks to rebase/merge/合回主分支 into local main after work is committed. Local only, never touches remotes.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Git Rebase Main skill
What this skill tells your AI
The instructions your AI receives, as published by dimon94/skills in skills/git-rebase-main/SKILL.md and read by ahel’s review.
Land the current branch on local main with linear history. Local only:
never push, never fetch, never delete the branch afterward.
1. Commit pending work here
If the current worktree is dirty, commit it per the git-commit skill.
2. Already on main → done
If the current branch is main, that commit was the landing. Report and stop.
3. Commit main's own dirt first
Locate main's worktree with git worktree list --porcelain. If main is
checked out somewhere and that worktree is dirty, commit it there per the
git-commit skill — before the rebase, because that commit advances main
and the branch must rebase onto the advanced head.
4. Rebase onto main
git rebase main. On conflict, apply the resolving-merge-conflicts skill;
never --abort.
5. Advance main to the rebased head
mainchecked out in a worktree → rungit merge --ff-only <branch>there.mainnot checked out anywhere → rungit branch -f main <branch>here.
If the merge is not fast-forward, stop and report. Do not force anything.
6. Report
New main head, commits landed, where dirt was committed (if any), and that
the source branch was left intact.
Signals
- GitHub stars
- 108
- Forks
- 21
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
git-rebase-main- Source
- github.com/dimon94/skills
More in Productivity
Skill · coreyhaines31
More in Productivitygws-calendar
Skill · googleworkspace
More in Productivitylark-minutes
Skill · larksuite
More in Productivitylark-workflow-standup-report
Skill · larksuite
More in Productivitywriting-plans
Skill · obra
More in Productivityhomelab-pihole-dns
Skill · affaan-m
More in Productivity