On private development branches, favour rebase over merge, and encourage rewriting history for a clean tree
Open
@cmnrd is already working on this.
Since Jun 14, 2024.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I've complained in the past on Zulip about the cleanliness of our git history trees.
Since our contributing guideline is rather indicative, I think it might be worth it to outline some suggestions to make our git history cleaner, such as:
- If working on a branch which nobody is actively using in a productive environment and pulling from the main branch is common, prefer
git pull --rebaseinstead of merge to keep the history linear - Be comfortable to rewrite history by using
rebasewithsquash/fixup/git commit --amendwhen solving linting/styling/typo problems, instead of have several "fix typo" or "minor fix" commits hanging around - Configure pre-commit hooks and ensure each commit is linted, instead of linting everything in one commit
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.