Skip to content

ericrisco/rsc-harness / skills/git-workflow

git-workflow

Verified

Use when naming or scoping a branch, writing or fixing a commit message, picking the gitmoji for a commit, untangling history (rebase versus merge versus squash), or cutting a versioned release — the portable git-convention layer for any repo. Covers gitmoji + Conventional Commits, SemVer tags, branch hygiene, force-push safety and gh pr/release mechanics. NOT the land-it decision and pre-ship checklist (that is `ship`), NOT an isolated checkout before coding (that is `worktrees`), NOT CI/CD release automation (that is `deployment`).

FileKindSize
SKILL.mdskill md13.9 KB
evals/README.mdmarkdown808 B
evals/cases.yamlconfig3.4 KB
references/gitmoji.mdmarkdown8.6 KB
references/interactive-rebase.mdmarkdown3.5 KB

references/interactive-rebase.md

View on GitHub
# Interactive rebase — cleaning history before review

The everyday path is one clean conventional commit per change. Reach for this only when a branch has
accumulated scratch commits you need to collapse, reorder, reword, or drop before a PR. This is a
private-branch operation: only rewrite history nobody else has built on.

## Start the rebase

```bash
git rebase -i HEAD~4        # edit the last 4 commits
git rebase -i main          # replay everything since main; clean the whole branch narrative
```

Git opens a todo list, oldest commit first. Each line starts with a verb you can change:

| Verb         | Effect                                                            |
|--------------|-------------------------------------------------------------------|
| `pick`       | keep the commit as-is                                             |
| `reword` (r) | keep the changes, edit the message (fix a non-conventional subject) |
| `edit` (e)   | pause at this commit to amend its content                        |
| `squash` (s) | fold into the previous commit, **combine** both messages         |
| `fixup` (f)  | fold into the previous commit, **discard** this message          |
| `drop` (d)   | delete the commit entirely (its changes are removed)             |
| reorder      | move a line up/down to reorder commits                           |

Typical cleanup: turn two `wip` commits into `fixup` lines under the real commit they belong to, and
`reword` the survivor into a proper `type(scope): subject`.

```text
pick   a1b2c3d feat(auth): add PKCE flow
fixup  d4e5f6a wip
fixup  7g8h9i0 wip more
```

## Autosquash — the disciplined way

If you mark fixups *as you go*, the rebase organizes itself:

```bash
git commit --fixup a1b2c3d          # creates "fixup! feat(auth): add PKCE flow"
git commit --squash a1b2c3d         # same, but keeps the message for editing
git rebase -i --autosquash main     # auto-orders the fixup!/squash! lines under their targets
```

Set `git config --global rebase.autosquash true` to make `--autosquash` the default.

## The conflict loop

A rebase replays commits one at a time, so a conflict can surface on any of them:

```bash
# rebase stops, reports a conflict
git status                  # see which files conflict
# edit the files, resolve the <<<<<<< markers
git add <resolved-files>
git rebase --continue       # advance to the next commit
# repeat until the rebase finishes
```

Escape hatches:

```bash
git rebase --skip           # drop the current commit and continue (rare; you lose its changes)
git rebase --abort          # bail out entirely — branch returns to its pre-rebase state
```

## Push the rewritten branch

A rebase rewrites hashes, so the remote branch diverges. Push with the lease, never bare force:

```bash
git push --force-with-lease     # refuses if the remote moved since your last fetch
```

If `--force-with-lease` is rejected, someone pushed to your branch — fetch and reconcile before you
overwrite anything. Do not escalate to `--force`.

## Recovery — you have a net

Every commit you "lost" to a rebase is still reachable until git garbage-collects it. `reflog` records
where `HEAD` has been:

```bash
git reflog                          # find the SHA from before the rebase, e.g. HEAD@{5}
git reset --hard a1b2c3d            # restore the branch to that exact state
```

This recovers a botched rebase, a wrong `drop`, or a reset you regret. The reflog makes interactive
rebase safe to experiment with on a *private* branch — never on shared history.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall