summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-12-02 13:47:26 +0100
committerGitHub <noreply@github.com>2022-12-02 13:47:26 +0100
commitacd55240da8f7cd0a2e7df57d02d417c97a0dc15 (patch)
tree28e4e9c1242baeb53cdea3b83d669911f2e02f8c
parent6826c76ba61771ae30652c46d98b993e5d508140 (diff)
parent714f94398434a948095c5ee597e69661974cd7fe (diff)
Merge pull request #196153 from ncfavier/contributing-no-squash
-rw-r--r--CONTRIBUTING.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2d83222ee3a8..94ed7f02f014 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,6 +53,10 @@ In addition to writing properly formatted commit messages, it's important to inc
Package version upgrades usually allow for simpler commit messages, including attribute name, old and new version, as well as a reference to the relevant release notes/changelog. Every once in a while a package upgrade requires more extensive changes, and that subsequently warrants a more verbose message.
+We prefer not to use the "squash merge" feature in nixpkgs: in order to keep as much information as possible in the commit history, we expect pull requests to consist of self-contained commits as described above.
+This means that, after addressing review comments and before the PR is merged, you will sometimes need to rewrite your branch's history and then force-push it with `git push --force-with-lease`.
+Useful commands to be comfortable with are `git commit --amend`, `git commit --fixup` and `git rebase -i` (and don't forget that git lets you define aliases!).
+
## Rebasing between branches (i.e. from master to staging)
From time to time, changes between branches must be rebased, for example, if the