Das Fork-and-PR-Muster
Die meisten Plattformen erwarten diesen Flow: Fork des Upstream-Repos, Klonen Ihres Forks, Branch fur die Anderung, Push, Pull Request offnen.
Setup
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
Aktuell bleiben
git fetch upstream
git rebase upstream/main
git push --force-with-lease origin fix/typo
Commits gestalten
git commit -s -m "fix(parser): handle empty input
Reject empty buffer with InvalidInput rather than panicking. Adds a
regression test in tests/parser/empty.rs.
Closes #1234"
Mailing-Liste-Projekte
Fur Projekte wie Linux verwenden Sie git format-patch und git send-email.
Feedback uberprufen
git commit --fixup=<sha>
git rebase -i --autosquash upstream/main
git push --force-with-lease
Sign-off und Trailer
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
Haufige Fehler
Vom Fork-main verzweigen, wenn dieser Monate hinterherhinkt.