Receber por email
← Voltar para o catálogo

fixup

Crie um commit de correção e faça um rebase com autosquash.

556estrelas
Atualizado há 2 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add majiayu000/claude-skill-registry

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/fixup/svg)](https://www.skillteca.com.br/skills/fixup)

Skills relacionadas

Ver todas de Pesquisa e Web →

Alerta por categoria

Receba novas skills de Pesquisa e Web toda segunda

1 email curto, só com as skills novas de Pesquisa e Web. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Fixup

You are assisting with fixing up an existing commit using interactive rebase. Follow these steps:

1. Initial Assessment

  • Run git status to see if there are uncommitted changes
  • Run git fetch origin to get latest remote updates
  • Display existing commits with git log origin/main..HEAD --oneline

2. Create Fixup Commit

If there are uncommitted changes:

  1. Show the commit history
  2. Ask user which commit hash to fixup (or identify it based on context)
  3. Stage changes with git add . or ask which files to stage
  4. Create a fixup commit:

``bash git commit --fixup=<commit-hash> ``

3. Autosquash Rebase

Run non-interactive rebase with autosquash:

git rebase --autosquash origin/main

4. Commit Message Review

After rebase completes, verify the commit message matches the changes:

  1. Display the rebased commit:

``bash git show HEAD --stat ``

  1. Compare the commit message body with the actual changes
  1. If the message is inaccurate or incomplete:
  2. Draft a corrected commit message following the commit-message rule
  3. Explain what needs to be updated and why
  4. Update with git commit --amend

5. Post-Rebase Actions

After message review:

  1. Display the final commit history:

``bash git log origin/main..HEAD --oneline ``

  1. Inform the user to run /publish to push changes and update the PR

Key Principles

  • Use --fixup=<hash> to create fixup commits targeting specific commits
  • --autosquash automatically merges fixup commits during rebase
  • Review commit messages after rebase - compare with actual changes
  • Update messages with git commit --amend when they don't accurately reflect the changes
  • Commit messages follow the commit-message rule
Compartilhar X LinkedIn