rebase-staging
Rebase the current Git branch onto the latest remote staging branch and safely force-push it.
Skill by hmdghoul
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hmdghoul-rebase-staging
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rebase-staging
What's inside
- Skill name
rebase-staging- Description
- Rebase the current Git branch onto the latest remote staging branch and safely force-push it.
- License
- Apache-2.0
- Instructions
- 12 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
Rebase the current branch onto the latest `origin/staging` and force-push it with `--force-with-lease`. Invoking this skill approves the whole flow; do not pause to confirm steps. If a step fails in a way not covered here, stop and report. Do not improvise. 1. `git branch --show-current`. If it is empty (detached HEAD) or `staging`, `main` or `master`, stop and tell the user. 2. `git status --porcelain --untracked-files=no`. If there is any output, stop and ask the user to commit or stash. Never auto-stash. Untracked files (e.g. a deliberately untracked `feature-docs/`) don't block: git refuses the rebase on its own if one would be overwritten. 3. `git fetch origin staging` 4. `git pull --ff-only origin "$(git branch --show-current)"` brings in remote-only commits so the later push isn't rejected as `stale info`. Name the branch: a bare `git pull` uses the upstream, which may be `staging`, and `origin HEAD` resolves on the remote. A never-pushed branch errors harmlessly, so continue. If it can't fast-forward (diverged), stop and report without forcing anything. 5. `git log --oneline origin/staging..HEAD`. If it is empty, the branch has no commits of its own: stop and report. Rebasing and force-pushing it is a no-op at best. 6. `git rebase --gpg-sign origin/staging`. The flag is required: repos with a signed-commits ruleset reject unsigned commits on push (GH013), and a plain rebase can rewrite the branch's commits unsigned. Resolve conflicts yourself rather than reporting them. For each file, read both sides, work out the intent of each change, and edit to a correct result that keeps both. Then `git add` it and `git rebase --continue` (the flag carries over), and repeat. Use `git rebase --abort` only as a last resort, when a conflict can't be resolved safely, then report what blocked it. 7. `git log --format='%G? %h %s' origin/staging..HEAD`. Every line must start with `G`. If any doesn't, stop and report before pushing. 8. `git push --force-with-lease origin HEAD`. The target is explicit because a bare push goes to the upstream, which may be `staging`. The lease still refuses if the remote moved.
From hmdghoul/claude-code-global-config, Apache-2.0.
More from hmdghoul/claude-code-global-config
- 0.570score
review-lessons
hmdghoul
Mine the review feedback on a repository's merged pull requests into a grouped, actionable "recurring mistakes" document, and create or update it at…
SkillAFreshness: AClaude Code +9 - 0.565score
investigate-ticket
hmdghoul
Investigate the Jira bug ticket linked to the current branch (or a ticket key you pass) WITHOUT implementing.
SkillAFreshness: AClaude Code +9 - 0.565score
feature-doc
hmdghoul
Generate a grounded, stakeholder-facing feature document (current + future implementation) for the CURRENT git branch by scanning its diff and the surrounding…
SkillAFreshness: AClaude Code +9 - 0.565score
slack-review-msg
hmdghoul
Generate a copy-pasteable Slack review request from the active git diff plus the PR link and Jira issue number the user provides.
SkillAFreshness: AClaude Code +9 - 0.565score
slack-ticket-msg
hmdghoul
Generate a copy-pasteable Slack message announcing a Jira ticket to a teammate or team lead (greeting, ticket link, plain-English summary, optional endpoint…
SkillAFreshness: AClaude Code +9 - 0.565score
split-task
hmdghoul
Split one Jira task into the fewest independently shippable subtasks (max 3), each drafted as a self-contained, AI-agent-ready ticket with outcome…
SkillAFreshness: AClaude Code +9 - 0.565score
review-lessons-reconcile
hmdghoul
Cross-check the CURRENT project's mined review lessons against the global rule tree (~/.claude/CLAUDE.md and the reference notes its routing table names in…
SkillAFreshness: AClaude Code +9 - 0.557score
sync-repos
hmdghoul
Sweep a parent folder of sibling Git repos — switch each to its default branch, fast-forward pull, and report branch, stash and uncommitted state in one table.
SkillAFreshness: AClaude Code +9 - 0.553score
explain-changes
hmdghoul
Analyze git diff, create a beginner-friendly changelog, and trace code sources to their business impact.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 10, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hmdghoul
- 0.570score
review-lessons
hmdghoul
Mine the review feedback on a repository's merged pull requests into a grouped, actionable "recurring mistakes" document, and create or update it at…
SkillAFreshness: AClaude Code +9 - 0.565score
investigate-ticket
hmdghoul
Investigate the Jira bug ticket linked to the current branch (or a ticket key you pass) WITHOUT implementing.
SkillAFreshness: AClaude Code +9 - 0.565score
review-lessons-reconcile
hmdghoul
Cross-check the CURRENT project's mined review lessons against the global rule tree (~/.claude/CLAUDE.md and the reference notes its routing table names in…
SkillAFreshness: AClaude Code +9 - 0.565score
slack-review-msg
hmdghoul
Generate a copy-pasteable Slack review request from the active git diff plus the PR link and Jira issue number the user provides.
SkillAFreshness: AClaude Code +9 - 0.565score
slack-ticket-msg
hmdghoul
Generate a copy-pasteable Slack message announcing a Jira ticket to a teammate or team lead (greeting, ticket link, plain-English summary, optional endpoint…
SkillAFreshness: AClaude Code +9 - 0.565score
split-task
hmdghoul
Split one Jira task into the fewest independently shippable subtasks (max 3), each drafted as a self-contained, AI-agent-ready ticket with outcome…
SkillAFreshness: AClaude Code +9
Cite this page
rebase-staging skill. Agent Mart. https://agentmart.dev/skills/hmdghoul-rebase-staging (last updated 2026-10-24)