Small commits, frequent merges, clear messages, and rebase only local.
Git hygiene
One concern per commit
If the message has "and" twice, split the commit.
Commit messages that survive `git log --oneline`
Imperative subject ≤50 chars, blank line, wrapped body ≤72 chars explaining why.
Rebase local, merge shared
Rebase your local branch onto main before opening a PR. Merge feature branches with
--no-ffto preserve the event.Never rebase main
Rewriting main breaks every clone.
Use `--force-with-lease`, never `--force`
Protects against overwriting someone else's push.