El patrón fork-y-PR
La mayoría de plataformas esperan este flujo: fork del repo upstream, clonar tu fork, branch para el cambio, push, abrir un pull request. Git lo trata como un flujo triangular con dos remotes.
Configuración
git clone [email protected]:you/project.git
cd project
git remote add upstream https://github.com/org/project.git
git fetch upstream
git checkout -b fix/typo upstream/main
Mantenerse al día
git fetch upstream
git rebase upstream/main
git push --force-with-lease origin fix/typo
Crear commits
git commit -s -m "fix(parser): manejar entrada vacía
Rechazar buffer vacío con InvalidInput en lugar de panic. Añade
test de regresión en tests/parser/empty.rs.
Closes #1234"
Proyectos basados en mailing-list
Para proyectos como Linux, usa git format-patch y git send-email.
Revisar feedback
git commit --fixup=<sha>
git rebase -i --autosquash upstream/main
git push --force-with-lease
Sign-off y trailers
git config --global format.signOff true
git commit --amend --no-edit --trailer 'Reviewed-by: Alice <a@x>'
git interpret-trailers --in-place --trailer 'Cc: maintainers@list' COMMIT_MSG
Errores comunes
Hacer branch desde el main de tu fork cuando está meses atrasado. Force-push sin --force-with-lease.